Results 1 to 7 of 7

Thread: QTreeWidget signal not working

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    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: QTreeWidget signal not working

    Qt Code:
    1. // connection
    2. connect(m_uiMainWindow.routingFlowTree, SIGNAL(itemDoubleClicked(QTreeWidgetItem*, int)), this, SLOT(onDoubleClickAddDesignItem(QTreeWidgetItem*, int)));
    3.  
    4. // slot
    5. void Something::onDoubleClickAddDesignItem(QTreeWidgetItem* item, int column)
    6. {
    7. QList<QTreeWidgetItem *> widgetList = m_uiMainWindow.routingFlowTree->findItems(QString("Add Design"),Qt::MatchRecursive);
    8.  
    9. if (widgetList.size() > 0 && item == widgetList.takeFirst())
    10. {
    11. // do your thing
    12. }
    13. }
    To copy to clipboard, switch view to plain text mode 
    J-P Nurmi

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

    Kapil (28th April 2006)

Similar Threads

  1. QTreeWidget clicked signal
    By ^NyAw^ in forum Qt Programming
    Replies: 41
    Last Post: 30th January 2010, 11:42
  2. pthread instead QThread
    By brevleq in forum Qt Programming
    Replies: 8
    Last Post: 23rd December 2008, 07:16
  3. Connection of custon signals/slots
    By brevleq in forum Qt Programming
    Replies: 2
    Last Post: 23rd December 2008, 07:04
  4. QTreeWidget double click signal
    By Pinco Pallino in forum Newbie
    Replies: 2
    Last Post: 18th November 2006, 16:37
  5. QTreeWidget SIGNAL
    By raphaelf in forum Newbie
    Replies: 6
    Last Post: 5th March 2006, 17: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
  •  
Qt is a trademark of The Qt Company.