Am Montag, 15. Februar 2016, 14:20:11 schrieben Sie: > On Monday, February 15, 2016 4:02:32 AM CET Frederik Schwarzer wrote: > > Hi, > > > > in Klickety the Configure dialog stopped working in one specific > > area. It's a QGroupBox with radio buttons represented as an Enum > > in the kcfg file. Two of the radio buttons have another widget > > right next to them. > > > > ---------------------------------------- > > > > | o Theme | > > | o Color [kcolorbutton] | > > | o Image [kurlrequester] | > > > > ---------------------------------------- > > > > So, as is, the Enum always says "0" and the Apply button remains > > grayed-out. > > If I then remove both of those extra widgets, the correct value is > > given (0-2) and the Apply button works as expected. > > > > You can find the UI file in > > https://quickgit.kde.org/?p=klickety.git&a=blob&f=bgselector.ui&o= > > plain and the last two widgets (KUrlRequester and KColorButton) > > are the culprits. > > > > Does anone have an idea why having another widget there disturbs > > the radio buttons? > > You can diff the generated files and see what happens. Also for the > KConfigCompiler (I think that's what you are complaining about? I > don't see any reason KConfigGroup would be the culprit here?)
Thanks for the hint. I tried that. If I remove the two widgets, the changes in the build dir are as follows. For me this looks pretty much as I would expect it to be. diff -ur temp_with/ui_bgselector.h temp/ui_bgselector.h --- temp_with/ui_bgselector.h 2016-02-15 17:37:35.855052087 +0100 +++ temp/ui_bgselector.h 2016-02-15 17:36:33.449802766 +0100 @@ -36,8 +36,6 @@ QRadioButton *theme; QRadioButton *color; QRadioButton *image; - KUrlRequester *kcfg_BgImage; - KColorButton *kcfg_BgColor; void setupUi(QWidget *BackgroundSelector) { @@ -70,17 +68,6 @@ gridLayout1->addWidget(image, 2, 0, 1, 1); - kcfg_BgImage = new KUrlRequester(kcfg_BgType); - kcfg_BgImage->setObjectName(QStringLiteral("kcfg_BgImage")); - kcfg_BgImage->setEnabled(false); - - gridLayout1->addWidget(kcfg_BgImage, 2, 1, 1, 1); - - kcfg_BgColor = new KColorButton(kcfg_BgType); - kcfg_BgColor->setObjectName(QStringLiteral("kcfg_BgColor")); - - gridLayout1->addWidget(kcfg_BgColor, 1, 1, 1, 1); - gridLayout->addWidget(kcfg_BgType, 3, 0, 1, 1); But then I looked at the latest KDE 4 version and it worked quite fine so I went through the changes since then and found that these widgets resided within a KButtonGroup, which was changed to a QGroupBox during porting (by me *coughs*) whereas it should have been changed to a combination of a QGroupBox and QButtonGroup according to http://api.kde.org/frameworks-api/frameworks5-apidocs/kdelibs4support/html/classKButtonGroup.html So currenty I am fighting with QtCreator to put in a QButtonGroup (harder than expected). Back to reading for now. :) Thanks, Frederik