Results 1 to 2 of 2

Thread: SIGNALS and SLOTS disconnection

  1. #1
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Thanks
    70
    Thanked 59 Times in 57 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default SIGNALS and SLOTS disconnection

    Hi,

    I have a QTreeWidget that have QTreeWidgetItems. This items have widgets at column 2 like QComboBox or QSpinBox. I connect one of the widget(QComboBox or QSpinBox) signal to one of my classes.
    This tree is cleared and repopulated with different data.

    The question is if I have to disconnect the signals or are automatically disconnected at the moment that the tree is cleared. Note that the internal data is not erased and the tree can be populated with the same data again making another time the connections.

    Thanks,
    Òscar Llarch i Galán

  2. #2
    Join Date
    Sep 2007
    Location
    Szczecin, Poland
    Posts
    153
    Thanks
    7
    Thanked 11 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: SIGNALS and SLOTS disconnection

    A signal-slot connection is removed when either of the objects involved are destroyed.
    It's written in manual under disconnect method of QObject.

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

    ^NyAw^ (31st October 2007)

Similar Threads

  1. Signals and Slots Across Threads
    By themusicalguy in forum Qt Programming
    Replies: 1
    Last Post: 26th October 2007, 11:16
  2. signals and slots in plugins
    By anderl in forum Qt Programming
    Replies: 1
    Last Post: 10th October 2007, 13:57
  3. Signals and Slots question
    By Thoosle in forum Qt Programming
    Replies: 5
    Last Post: 5th December 2006, 00:24
  4. Signals and Slots in dll
    By ankurjain in forum Qt Programming
    Replies: 8
    Last Post: 29th March 2006, 08:12
  5. Problem with Signals and Slots
    By Kapil in forum Newbie
    Replies: 11
    Last Post: 15th February 2006, 11: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.