Results 1 to 3 of 3

Thread: finding dynamically create object

  1. #1
    Join Date
    Jan 2008
    Location
    Vancouver, Canada
    Posts
    54
    Thanks
    17
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default finding dynamically create object

    Hello,

    I think that I should know this, but I don't. It might not be a Qt question, but maybe it is, so here I go.

    I created QTableWidgetItems dynamically and inserted them into a QTableWidget using a for loop. For some of these QTableWidgetItems, i added a QToolTip like below:

    Qt Code:
    1. itemToInsert->setToolTip("details");
    To copy to clipboard, switch view to plain text mode 

    I am now required to put all of this into an XML file, and it is easy to get the information from the qtablewidgets, but I am not sure how to reference the QToolTip that I made earlier to get the text from it. Can someone tell me how to do this, assuming it is possible?Does this make sense?

    Thanks for your time, yet again.

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

    TheIndependentAquarius (27th January 2014)

  3. #2
    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: finding dynamically create object

    You can access the tooltip set with QTableWidgetItem::toolTip() (or QWidget::toolTip() for widgets).

  4. The following user says thank you to wysota for this useful post:

    TheIndependentAquarius (27th January 2014)

  5. #3
    Join Date
    Jan 2008
    Location
    Vancouver, Canada
    Posts
    54
    Thanks
    17
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: finding dynamically create object

    Wow, I was definetly making a mountain out of a mole hill there. Thanks!

Similar Threads

  1. Replies: 8
    Last Post: 20th April 2007, 01:37
  2. dynamically create folders with QT
    By eleanor in forum Newbie
    Replies: 3
    Last Post: 13th March 2007, 12:40
  3. Can't create an object : initialisation problem ?
    By Nyphel in forum Qt Programming
    Replies: 5
    Last Post: 12th March 2007, 10: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.