Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-20027

Padding in QToolTip stylesheet causes text to show incorrectly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.2.1
    • 4.7.2, 4.7.3
    • Widgets: Style Sheets
    • None
    • windows 7

    Description

      With below code, tooltip text does not show. Removing padding and border shows text correctly. Patch attached to fix this bug.

      #include <QtGui/QApplication>
      #include "mainwindow.h"
      #include <QToolButton>
      
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
          QToolButton button;
          button.setStyleSheet( "QToolTip {\
                                padding: 6px;\
                border: 1px solid rgb(199, 202, 204);\
                background-color: rgb(227, 243, 252);\
                color: rgb(64, 64, 66);\
      }");
          button.setToolTip("my tooltip");
          button.show();
      
          return a.exec();
      }
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              rlohning Robert Löhning
              qtcomsupport Qt Support
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes