Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to make the QAplication ToolTip background transparent?
Qt 6.11 is out! See what's new in the release blog

How to make the QAplication ToolTip background transparent?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 675 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Roberrt
    wrote on last edited by
    #1

    I'm trying to find a way to set the background color of any tooltip of the entire qapplication to transparent.

    I tried:

    QPalette palette = QToolTip::palette();
    //palette.setColor(QPalette::Window, QColor(0, 0, 0, 0)); 
    palette.setColor(QPalette::Base, Qt::transparent);        
    QToolTip::setPalette(palette);
    

    Also:

    qApp->setStyleSheet("QToolTip: { background-color: transparent; } ");
    

    But the tooltip background is not getting transparent.
    Theres something else i could try?

    JoeCFDJ 1 Reply Last reply
    0
    • R Roberrt

      I'm trying to find a way to set the background color of any tooltip of the entire qapplication to transparent.

      I tried:

      QPalette palette = QToolTip::palette();
      //palette.setColor(QPalette::Window, QColor(0, 0, 0, 0)); 
      palette.setColor(QPalette::Base, Qt::transparent);        
      QToolTip::setPalette(palette);
      

      Also:

      qApp->setStyleSheet("QToolTip: { background-color: transparent; } ");
      

      But the tooltip background is not getting transparent.
      Theres something else i could try?

      JoeCFDJ Offline
      JoeCFDJ Offline
      JoeCFD
      wrote on last edited by
      #2

      @Roberrt said in How to make the QAplication ToolTip background transparent?:

      background color of any tooltip

      try this?

          QApplication::setStyleSheet(styleSheet);
      
      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved