<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'Bitstream Vera Sans'; font-size:12pt; font-weight:400; font-style:normal;">On Monday 08 December 2008, Ben Cooksley wrote:<br>
> On 12/8/08, Aaron J. Seigo <aseigo@kde.org> wrote:<br>
> > On Sunday 07 December 2008, Ben Cooksley wrote:<br>
> >> Hi,<br>
> >><br>
> >> I am developing the KuickQuiz plasmoid ( currently very alpha in<br>
> >> playground/base/plasma/applets/kuickquiz ) and use Plasma::RadioButton<br>
> >> to allow the user to choose the multi choice answer they want.<br>
> >> However, I have ran into the issue of despite 4 Plasma::RadioButtons<br>
> >> having the same parent, the radio button itself is never auto<br>
> >> exclusive, so when the user changes their mind, the answer does not<br>
> >> automatically switch to the newly chosen choice, and both become<br>
> >> chosen so the user could potentially cheat and choose all of the<br>
> >> choices.<br>
> ><br>
> > what are the RadioButtons parented to, exactly?<br>
><br>
> They are parented to "this" which is "QuizQuestion" a subclass of<br>
> Plasma::Frame. the involved code is in quizquestion.cpp line 31 (<br>
> http://websvn.kde.org/trunk/playground/base/plasma/applets/kuickquiz/quizqu<br>
>estion.cpp )<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>ah, Plasma::Frame isn't actually a QGraphicsProxyWidget. it's just pretending to be one; nativeWidget() even just returns 0 ... always.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>try putting them in a Plasma::GroupBox instead and see if that works.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>*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 =)<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>-- <br>
Aaron J. Seigo<br>
humru othro a kohnu se<br>
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>KDE core developer sponsored by Qt Software<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p></body></html>