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

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

XMLWordPrintable

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

      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();
      }
      

       

       

       

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes