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

QPushButton: styling causes clicked() signal not to emit when clicked

    XMLWordPrintable

Details

    • All
    • 757a9c21c18faad5573308d8dd85428a4519ac7d (qt/qtbase/dev) 54af42818064e041859aa690a30a88c9b0729d7a (qt/qtbase/5.15)

    Description

      This issue occurred after upgrading from Qt 5.14.2 to 5.15.1.

      When you have a QPushButton and add a stylesheet which sets the "padding" property, the clicked() signal is not fired when you click on the padded part of the button. In my case, you need to click almost the exact center of the button for it to work.

      Steps to reproduce:

      1. Create a new Qt Widgets Application
      2. Add a QPushButton to the MainWindow form
      3. Set the following stylesheet on the QPushButton:
        padding: 15px;
      4. Click the edges of the button to see the clicked() signal not being emitted.

      Attachments

        Issue Links

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

          Activity

            People

              vhilshei Volker Hilsheimer
              zapphire Casper Kruse
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes