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

Slot QtDialog::done is not called when a button is pushed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.14.2
    • None
    • Windows
    • Windows

      If I inherit a class from QMessageBox I don't receive the done() signal when a button is pressed. The code is built using Qt5.14.2. However with Qt5.12.0 it is called.

      class QtQuery : public QMessageBox
      {
      _Q_OBJECT_
      public:

      QtQuery(int a_button1,
                     int a_button2,
                     int a_button3);

      //! Destructor.
          virtual ~QtQuery( );

      protected slots:
           void done(int a_val);
      };

       ...

      void QtQuery::done(int a_val)
      {
      std::cout << "Done is called - result: [" << a_val << "]" << std::endl;
      }

       

       

      Launching the attached example built using Qt5.12.0. Just push any button to close the message box:

      Testing ....
      Done is called - result: [1024]
      Testing ends with ret: 1024

       

      Launching the example built using Qt5.14.2:

      Testing ....
      Testing ends with ret: 1024

       

       

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            miguel.majuelos Miguel Majuelos Mudarra
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes