To quote myself: I think I see what's going wrong. We decided to ignore the user property for QComboBox once Qt added it, because it was different from what KDE expected (KDE needs the text, Qt uses the index). We should continue to ignore this user property from QComboBox and all its subclasses, unless the subclass has its own user property, like KColorCombo does. I have to check if Qt's meta system can supply this information... Andreas Pakulat wrote: That should be doable: int qcombouserpropindex = QComboBox::staticMetaObject.indexOfProperty(QComboBox::staticMetaObject.userProperty().name()); int curwidgetuserpropindex = widget->metaObject()->indexOfProperty(widget->metaObject()->userProperty().name()); if( qcombouserpropindex != -1 && curwidgetuserpropindex != -1 && qcombouserpropindex != curwidgetuserpropindex ) { // user user-property } else { // use the q/kcombobox special code } Or am I overlooking something? Obviously that would need a really verbose comment on why its done :)
For more information, see "Bug in kcfg, KColorCombo not handled correct" on k-c-d, and "Review Request 101486" on k-c-d.
There's a fix for this at https://git.reviewboard.kde.org/r/103909/
Git commit c27b939ac971f23e8cf8950e76c3f2745c634d72 by Albert Astals Cid. Committed on 23/02/2012 at 23:12. Pushed by aacid into branch 'KDE/4.8'. Fix KConfigDialogManager fails to handle subclasses of QComboBox with custom property REVIEW: 103909 Acked by Christoph Feck M +18 -6 kdeui/dialogs/kconfigdialogmanager.cpp M +1 -0 kdeui/tests/CMakeLists.txt A +132 -0 kdeui/tests/kconfigdialog_unittest.cpp [License: LGPL (v2+)] http://commits.kde.org/kdelibs/c27b939ac971f23e8cf8950e76c3f2745c634d72