Results 1 to 4 of 4

Thread: What happens with the connections when I hide a widget?

  1. #1
    Join Date
    Jan 2006
    Posts
    105
    Thanks
    38
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default What happens with the connections when I hide a widget?

    Hi all, I want to know what happens with the connections of a widget when I hide it: If the signal arrives when the widget is hidden, the slot connected to this signal is executed? or maybe the widget (or the application) put it in a queue of slots to execute them when the widget is shown again? or simply it discards the signal? I think that the slot is executed but I want to know it exactly.

    Thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: What happens with the connections when I hide a widget?

    The slot will be executed.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: What happens with the connections when I hide a widget?

    Quote Originally Posted by Dark_Tower
    Hi all, I want to know what happens with the connections of a widget when I hide it: If the signal arrives when the widget is hidden, the slot connected to this signal is executed?
    Yes, the slot gets executed. Remember, that signals are QObject oriented, not QWidget oriented, so they don't "see" the target (unless a particular slot checks if the widget is hidden, but still the slot gets executed, just does nothing).

  4. #4
    Join Date
    Jan 2006
    Posts
    105
    Thanks
    38
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: What happens with the connections when I hide a widget?

    Thanks both, now I've got it clear

Similar Threads

  1. How to hide Close Button "X" on Widget ?
    By merry in forum Qt Programming
    Replies: 8
    Last Post: 25th January 2020, 08:03
  2. Replies: 10
    Last Post: 20th April 2015, 22:24
  3. QDockWidget inside another widget in the center?
    By Antebios in forum Qt Programming
    Replies: 1
    Last Post: 16th February 2010, 07:06
  4. Hide widget, but not change layout
    By dimaz in forum Qt Programming
    Replies: 3
    Last Post: 21st November 2008, 14:32
  5. hide the row heading of Table Widget
    By sabeesh in forum Qt Programming
    Replies: 1
    Last Post: 24th July 2007, 11:31

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.