PDA

View Full Version : Connecting sig/slots between radio's and widget stack form.



nleverin
7th August 2007, 06:46
Hi,

Im using Qt3 Designer and am trying create a sig/slot connection between the radio buttons R1 & R2 and a widget stack WS1 that contains two forms F1 and F2.

Now im trying to use the designers connection functionality so that when R1 toggle button is selected F1 is display and when R2 is selected F2 is displayed.

However the when trying to implement this in the designer only the widget stack (ie WS1) is being displayed in the drop down menu that lists all the receiver widgets. Therefore i can only set the setShown() function on the widget stack rather than an individual forms within the widget stack.

Was just checking to see if anyone has previously implemented this with the designer before i have to implement the required functionality within my subclass.

thanks in advance,

nlev.

Michiel
7th August 2007, 09:27
You need to put the radio buttons into a QButtonGroup. Then connect QButtonGroup::clicked(int) to the widget stack.