Results 1 to 3 of 3

Thread: Catch a signal

  1. #1
    Join Date
    Feb 2011
    Location
    Latvia
    Posts
    139
    Thanks
    24
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Catch a signal

    I have an interesting problem (or not):
    I want to catch a signal clicked, that is coming from a button in another class... How do i do that?

  2. #2
    Join Date
    Aug 2009
    Location
    coimbatore,India
    Posts
    314
    Thanks
    37
    Thanked 47 Times in 43 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Catch a signal

    hi,
    use class name before the button
    ex: anotherClass->button

    hope it helps
    Bala

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

    Archa4 (17th February 2011)

  4. #3
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Catch a signal

    connect(source class->button, SIGNAL(clicked()), target_class, SLOT(handleButtonClick())). The connect statement connects signals and slots.
    Qt 5.3 Opensource & Creator 3.1.2

  5. The following user says thank you to MarkoSan for this useful post:

    Archa4 (17th February 2011)

Similar Threads

  1. how to catch "click" signal on the dialog
    By fulbay in forum Qt Programming
    Replies: 2
    Last Post: 16th February 2011, 11:27
  2. Replies: 2
    Last Post: 20th March 2010, 18:22
  3. catch signal stepDown from doubleSpinBox
    By pospiech in forum Qt Programming
    Replies: 10
    Last Post: 3rd January 2009, 11:51
  4. How to catch segfaults?
    By Daliphant in forum Newbie
    Replies: 4
    Last Post: 3rd July 2008, 14:17
  5. Replies: 1
    Last Post: 29th February 2008, 23: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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.