Results 1 to 13 of 13

Thread: Problem emiting signal in QTreeWidgetItem's subclass

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2007
    Posts
    91
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    60

    Default Re: Problem emiting signal in QTreeWidgetItem's subclass

    Quote Originally Posted by Shawn View Post
    The strange thing is that the message box appears many times when I click on any item. 22 times on my laptop and 38 or 39 times on my workstation...
    I test it using a local static variable, and found that the exact times the testslot has been called is 22. Why it behaves like this ?

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

    Default Re: Problem emiting signal in QTreeWidgetItem's subclass

    Do you call QObject::connect() in a loop?
    J-P Nurmi

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

    Shawn (4th September 2007)

  4. #3
    Join Date
    May 2007
    Posts
    91
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    60

    Default Re: Problem emiting signal in QTreeWidgetItem's subclass

    Sorry, stupid mistake

    I connected in a recursion function...

    After replace it to the constractor, it works well

    Thanks very much for your help!

Similar Threads

  1. Replies: 3
    Last Post: 15th April 2007, 19:16

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
  •  
Qt is a trademark of The Qt Company.