Results 1 to 5 of 5

Thread: Signal & Slot editor

  1. #1
    Join Date
    Jul 2007
    Posts
    11
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Signal & Slot editor

    Hello,
    another question on QtDesigner. In the old (3) version the designer was aware of the "custom slots" implemented by the user and you could use the interface to link the signals from the objects to whatever slot function you had implemented for your receiver window (or widget).
    Now all I am able to do is to link a signal to a standard widget slot. I'm not trying anything fancy, I just want some buttons' clicked() slot to connect to my window's slots which do the actual work..... is there a way to do it?
    I've always assumed that no, and did the connection manually with the the code in the window constructor, but now I have converted some forms from qt3 and they show the custom slots in the signal and slot editor window. So maybe there's a way to have them show up?

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

    Default Re: Signal & Slot editor

    Quote Originally Posted by Ishark View Post
    Hello,
    another question on QtDesigner. In the old (3) version the designer was aware of the "custom slots" implemented by the user and you could use the interface to link the signals from the objects to whatever slot function you had implemented for your receiver window (or widget).
    Now all I am able to do is to link a signal to a standard widget slot. I'm not trying anything fancy, I just want some buttons' clicked() slot to connect to my window's slots which do the actual work..... is there a way to do it?
    I've always assumed that no, and did the connection manually with the the code in the window constructor, but now I have converted some forms from qt3 and they show the custom slots in the signal and slot editor window. So maybe there's a way to have them show up?
    You can link a signal to your defined slot. Just like in old(3) version. When you right-click on your widget choose "Change signals/slots...". There you can add your signals/slots (with + sign). And then link whatever signal you need to your slot.

  3. #3
    Join Date
    Jul 2007
    Posts
    11
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Signal & Slot editor

    I'm not sure I understand where this option is.

    I've tried with a frame in a dialog. If I right-click either the dialog or the frame, the pop-up menu doesn't have any "Change signals/slots....".
    Even if I promote it, I still don't have that option.

    I'm using Qt designer 4.3.4 Open Source Edition.

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

    Default Re: Signal & Slot editor

    Quote Originally Posted by Ishark View Post
    I've tried with a frame in a dialog. If I right-click either the dialog or the frame, the pop-up menu doesn't have any "Change signals/slots....".
    Even if I promote it, I still don't have that option.
    Wow, that is interesting... I'm using Qt4.4.0.. I;ve tried with a frame in a dialog too.. When i right-click on my frame then there is no such option... but right-click on my dialog brings up a menu with "Change signals/slots..." option. Hm... if i find the solution, i'll let you know

  5. #5
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Signal & Slot editor

    That's a new feature in Qt 4.4.0:
    * [132874] Added support for user-defined signals and slots of promoted widgets and main container
    J-P Nurmi

  6. The following 2 users say thank you to jpn for this useful post:

    daebarkee (3rd September 2009), Ishark (29th May 2008)

Similar Threads

  1. Signal in base class Slot in Subclass
    By csvivek in forum Newbie
    Replies: 7
    Last Post: 30th March 2008, 17:59
  2. signal not getting communicated to slot
    By quickNitin in forum Qt Programming
    Replies: 17
    Last Post: 2nd June 2006, 05:56
  3. Manually send signal to slot
    By donmorr in forum Qt Programming
    Replies: 1
    Last Post: 29th May 2006, 16:03
  4. signal slot conection using a string, not a SLOT
    By rianquinn in forum Qt Programming
    Replies: 6
    Last Post: 5th February 2006, 19:52

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.