Results 1 to 14 of 14

Thread: problem connect signal - slot

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Wiki edits
    5

    Default Re: problem connect signal - slot

    Quote Originally Posted by lyuts View Post
    Qt Code:
    1. connect(groupBox1, SIGNAL(toggled(bool)), this, SLOT(mySlot(bool)));
    2. ...
    3. void
    4. mySlot(bool ipFlag)
    5. {
    6. groupBox2->setEnabled(!ipFlag);
    7. }
    To copy to clipboard, switch view to plain text mode 
    For that you can simply use QWidget::setDisabled().
    Qt Code:
    1. connect(groupBox1, SIGNAL(toggled(bool)), groupBox2, SLOT(setDisabled(bool)));
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    May 2008
    Location
    Kyiv, Ukraine
    Posts
    418
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    1
    Thanked 29 Times in 27 Posts

    Default Re: problem connect signal - slot

    Yes, Lykurg, you are right. How could i miss such an obviuos thing.
    I'm a rebel in the S.D.G.

  3. #3
    Join Date
    Dec 2007
    Location
    Brazil
    Posts
    61
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    14

    Default Re: problem connect signal - slot

    Thanks guys! The help of all was very important.

Similar Threads

  1. Replies: 8
    Last Post: 27th August 2009, 15:51
  2. qt signal/slot auto-connect issue
    By parnedo in forum Qt Programming
    Replies: 9
    Last Post: 16th July 2009, 13:55
  3. A signal/slot connect isn't working.
    By Daimonie in forum Qt Programming
    Replies: 6
    Last Post: 15th February 2009, 23:55
  4. Connect signal from base to slot of sub-sub-object
    By donglebob in forum Qt Programming
    Replies: 15
    Last Post: 30th October 2008, 20:54
  5. Replies: 12
    Last Post: 18th September 2008, 16:04

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
  •  
Qt is a trademark of The Qt Company.