From 4a1a12cae90387018e1653d8d2ec989b7c317851 Mon Sep 17 00:00:00 2001 From: jiangkegeng <jiangkegeng> Date: 星期三, 06 十一月 2024 11:05:32 +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