Results 1 to 3 of 3

Thread: QToolTip tables adding an extra row

  1. #1
    Join Date
    Mar 2006
    Location
    Troy, Michigan, USA
    Posts
    17
    Thanks
    2
    Qt products
    Qt3
    Platforms
    MacOS X Unix/X11 Windows

    Default QToolTip tables adding an extra row

    When I use the HTML commands to create a table in the tooltip, it creates an extra row after the table.

    Is there anyway to get around this?

    tooltip.png

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: QToolTip tables adding an extra row

    Check your HTML code again.
    ToolTip-HTML.jpg
    Qt Code:
    1. int main(int argc, char *argv[])
    2. {
    3. QApplication app(argc, argv);
    4.  
    5. QWidget widget;
    6. QString html =
    7. "<table border=\"0\">"
    8. "<tr> <td>Constraint:</td> <td>Displacement Constraint 3</td> </tr>"
    9. "<tr> <td>Load Case:</td> <td>Load Case 1</td> </tr>"
    10. "<tr> <td>Limit:</td> <td>12mm</td> </tr>"
    11. "<tr> <td>Achieved:</td> <td>13.3mm</td> </tr>"
    12. "</table>";
    13.  
    14. widget.setWindowTitle("ToolTil - HTML");
    15. widget.setToolTip(html);
    16. widget.show();
    17.  
    18. return app.exec();
    19. }
    To copy to clipboard, switch view to plain text mode 
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

  3. #3
    Join Date
    Mar 2006
    Location
    Troy, Michigan, USA
    Posts
    17
    Thanks
    2
    Qt products
    Qt3
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QToolTip tables adding an extra row

    Thanks, that is exactly what I am doing. Maybe it is a bug in Qt 3, I will try it in Qt 4

Similar Threads

  1. Replies: 4
    Last Post: 13th July 2010, 05:17
  2. Replies: 1
    Last Post: 16th May 2010, 19:25
  3. visual studio project files - adding extra files
    By luf in forum Qt Programming
    Replies: 3
    Last Post: 13th June 2008, 21:05
  4. QToolTip
    By suresh in forum Newbie
    Replies: 7
    Last Post: 6th September 2006, 15:00

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.