Results 1 to 3 of 3

Thread: formatting a tool tip without using a styleSheet

  1. #1
    Join Date
    Jan 2017
    Posts
    54
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default formatting a tool tip without using a styleSheet

    I am trying to format the appearance of a tool tip tool tip without using a style sheet (I have already set a style sheet for this button and a new style sheet will over rite the old one). so far, I have this:

    Qt Code:
    1. self.ui.taxTables.setToolTip('<b><font color=red><font-size: 24px><background-color: #00ffff>My tool tip message is here')
    To copy to clipboard, switch view to plain text mode 

    The bold and the font color work, but the font-size and background color do not. Is it possible to format a tool tip this way? Is the syntax not correct?

    thanks
    Newbie

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: formatting a tool tip without using a styleSheet

    Refer to the Qt documentation on the subset of HTML support in the Rich Text Format, which is what you (maybe unknowingly) are using in your tooltip.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. #3
    Join Date
    Jan 2017
    Posts
    54
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: formatting a tool tip without using a styleSheet

    Thanks for responding

    Well, I read the documentation. I do not know HTML, and the docs do not give me an example that I can follow. I do not know the syntax, like when and where to use <>, =, :, or "". One example of using all of my fonts, colors, background, and font size would help.

Similar Threads

  1. QTextEdit and formatting
    By fusycmr in forum Newbie
    Replies: 4
    Last Post: 9th July 2012, 06:14
  2. Grouping of Tool buttons in Tool bar
    By febil in forum Qt Programming
    Replies: 1
    Last Post: 24th March 2009, 12:51
  3. Formatting a QString
    By icentenee in forum Newbie
    Replies: 9
    Last Post: 1st October 2006, 18:41
  4. QString formatting
    By brcain in forum Qt Programming
    Replies: 1
    Last Post: 27th September 2006, 04:00
  5. QToolBox Formatting
    By cwalsh in forum Newbie
    Replies: 8
    Last Post: 10th January 2006, 00:08

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.