Results 1 to 3 of 3

Thread: [SOLVED]"catch" a custom signal emited by a promoted widget inside the Ui

  1. #1
    Join Date
    Sep 2008
    Location
    Portugal
    Posts
    171
    Thanks
    57
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default [SOLVED]"catch" a custom signal emited by a promoted widget inside the Ui

    Hello.

    I have class A and in the a.ui i insert a widget(Class W). User the promotion aproach here.
    Both were created using a.h, x.cpp and x.ui.
    I created mySignal(QString &) in w.h and then emit(mySignal("Hello") somewhere in the w.cpp.
    Can i receive this SIGNAL at the base class A?

    Thanks
    Last edited by graciano; 20th March 2010 at 19:23.

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

    Default Re: "catch" a custom signal emited by a promoted widget inside the Ui

    Well your description is very confusing.... Did you search
    Qt Code:
    1. A::A(){
    2. connect(ui.w, SIGNAL(mySignal(QString &)), this, SLOT(mySlot(QString &)));
    3. }
    To copy to clipboard, switch view to plain text mode 

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

    graciano (20th March 2010)

  4. #3
    Join Date
    Sep 2008
    Location
    Portugal
    Posts
    171
    Thanks
    57
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: "catch" a custom signal emited by a promoted widget inside the Ui

    Well your description is very confusing....
    I agree on this

    But looking at your line of code i realised what i was doing wrong.

    Thanks

Similar Threads

  1. Replies: 7
    Last Post: 21st January 2010, 13:45
  2. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 20:05
  3. How to catch "ENTER" with keyPress?
    By lumber44 in forum Qt Programming
    Replies: 8
    Last Post: 30th July 2007, 17:21
  4. Signal defined in "a.h" can not emit in "b.cpp"
    By Shawn in forum Qt Programming
    Replies: 9
    Last Post: 21st May 2007, 17:55
  5. Replies: 2
    Last Post: 25th August 2006, 12:35

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.