From 4382f9ee3df2ff2be018c81f2cf853a8f138ac12 Mon Sep 17 00:00:00 2001 From: jhc <2991879965@qq.com> Date: 星期六, 09 十一月 2024 15:42:27 +0800 Subject: [PATCH] 上传总结 --- Client/姜可庚/code/2024kunlun_project_permisson/qcomboxdelegate.cpp | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git "a/Client/\345\247\234\345\217\257\345\272\232/code/2024kunlun_project_permisson/qcomboxdelegate.cpp" "b/Client/\345\247\234\345\217\257\345\272\232/code/2024kunlun_project_permisson/qcomboxdelegate.cpp" index 8eab6b3..01d0fde 100644 --- "a/Client/\345\247\234\345\217\257\345\272\232/code/2024kunlun_project_permisson/qcomboxdelegate.cpp" +++ "b/Client/\345\247\234\345\217\257\345\272\232/code/2024kunlun_project_permisson/qcomboxdelegate.cpp" @@ -16,7 +16,21 @@ { QComboBox * box = new QComboBox(parent); QStringList text; - text << "鏅�氶噰鐭垮憳宸�" << "鎶�鏈淮鎶や汉鍛�" << "绯荤粺绠$悊鍛�"<< "瀹夊叏绠$悊浜哄憳"; + + QString curText = qvariant_cast<QString>(index.data()); + + vector<QString> vecq; + vecq.push_back("鎶�鏈淮鎶や汉鍛�"); + vecq.push_back("绯荤粺绠$悊鍛�"); + vecq.push_back("瀹夊叏绠$悊浜哄憳"); + vecq.push_back("鏅�氶噰鐭垮憳宸�"); + + text << curText; + for(QString role : vecq){ + if(curText!=role){ + text << role; + } + } box->addItems(text); return box; -- Gitblit v1.8.0