On Monday 08 December 2008, Ben Cooksley wrote: > On 12/8/08, Aaron J. Seigo <[EMAIL PROTECTED]> wrote: > > On Sunday 07 December 2008, Ben Cooksley wrote: > >> Hi, > >> > >> I am developing the KuickQuiz plasmoid ( currently very alpha in > >> playground/base/plasma/applets/kuickquiz ) and use Plasma::RadioButton > >> to allow the user to choose the multi choice answer they want. > >> However, I have ran into the issue of despite 4 Plasma::RadioButtons > >> having the same parent, the radio button itself is never auto > >> exclusive, so when the user changes their mind, the answer does not > >> automatically switch to the newly chosen choice, and both become > >> chosen so the user could potentially cheat and choose all of the > >> choices. > > > > what are the RadioButtons parented to, exactly? > > They are parented to "this" which is "QuizQuestion" a subclass of > Plasma::Frame. the involved code is in quizquestion.cpp line 31 ( > http://websvn.kde.org/trunk/playground/base/plasma/applets/kuickquiz/quizqu >estion.cpp )
ah, Plasma::Frame isn't actually a QGraphicsProxyWidget. it's just pretending to be one; nativeWidget() even just returns 0 ... always. try putting them in a Plasma::GroupBox instead and see if that works. *or* create a QButtonGroup, which is a QObject class and allows you to group buttons however you'd like. not as elegant as automatically working, but should be guaranteed to work =) -- Aaron J. Seigo humru othro a kohnu se GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43 KDE core developer sponsored by Qt Software
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel