Results 1 to 1 of 1

Thread: [SOLVED] QTreeWidgetItem as sender in the SIGNAL/SLOT mechanism

  1. #1
    Join Date
    Mar 2010
    Posts
    54
    Qt products
    Qt/Embedded
    Platforms
    Symbian S60

    Default [SOLVED] QTreeWidgetItem as sender in the SIGNAL/SLOT mechanism

    Hi
    I have a small problem in my code , I am currently using (SettingsTree) as sender of a SIGNAL(itemClicked(QTreeWidgetItem*,int), but I basically need the child (QTreeWidgetItem*) as the sender

    May I know How can I go about it ?

    Qt Code:
    1. QTreeWidgetItem* SettingsTree::eBeamRESOURCETREE()
    2. {
    3. root2->setText(0,"RESOURCES");
    4. for(int i=0;i<1;i++)
    5. {
    6. child = createItem("eBeam Web Resources",root2,0);
    7. child->setFlags(Qt::ItemIsSelectable);
    8.  
    9. }
    10. while(*it)
    11. {
    12. QString test = (*it)->text(0);
    13. if(test == "eBeam Web Resources")
    14. {
    15. connect(this,SIGNAL(itemClicked(QTreeWidgetItem*,int)),SLOT(openwebsite()),Qt::DirectConnection);
    16. }
    17. ++it;
    18. }
    19.  
    20. return child;
    21. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by kamlmish; 15th December 2010 at 07:34.

Similar Threads

  1. signal -slot mechanism!! an interesting problem!!!
    By qt_user in forum Qt Programming
    Replies: 6
    Last Post: 5th August 2010, 12:20
  2. signal -slot mechanism
    By qt_user in forum Qt Programming
    Replies: 2
    Last Post: 30th July 2010, 19:34
  3. When should I use signal/slot mechanism
    By Bryku in forum Newbie
    Replies: 3
    Last Post: 10th February 2010, 23:24
  4. slow signal-slot-mechanism
    By blm in forum Qt Programming
    Replies: 11
    Last Post: 28th October 2008, 18:10
  5. The threaded signal/slot mechanism
    By xbtl in forum Newbie
    Replies: 1
    Last Post: 30th March 2008, 01:07

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.