Results 1 to 2 of 2

Thread: Connecting sig/slots between radio's and widget stack form.

  1. #1
    Join Date
    Jun 2007
    Posts
    21
    Thanks
    25
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Connecting sig/slots between radio's and widget stack form.

    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.

  2. #2
    Join Date
    Mar 2006
    Location
    The Netherlands
    Posts
    300
    Thanks
    9
    Thanked 29 Times in 29 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Connecting sig/slots between radio's and widget stack form.

    You need to put the radio buttons into a QButtonGroup. Then connect QButtonGroup::clicked(int) to the widget stack.
    "The strength of a civilization is not measured by its ability to wage wars, but rather by its ability to prevent them." - Gene Roddenberry

  3. The following user says thank you to Michiel for this useful post:

    nleverin (7th August 2007)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.