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

click in padding area doesn't trigger clicked() signal in QPushButton

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P1: Critical
    • None
    • 5.15.1
    • None
    • Windows

    Description

      click in padding area doesn't trigger clicked() signal in QPushButton

      in the following code when you click close to edges clicked() signal won't get triggered, this works fine in other qt versions (5.14.2, 5.12.8)

       

      #include <QApplication>
      #include <QPushButton>
      #include <QWidget>
      
      int main(int argc, char *argv[]) {
        QApplication a(argc, argv);
      
        qApp->setStyleSheet(R"(
      QPushButton {
        padding: 64px 64px; }
      )");
      
        QWidget w;
        QPushButton p(&w);
        QObject::connect(&p, &QPushButton::clicked, [](bool) { qDebug("clicked"); });
        w.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

              vhilshei Volker Hilsheimer
              jagannatharjun Prince Gupta
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes