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

Extra Behaviour of MousePressEvent+RightButtonPressed+Exit

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4: Low P4: Low
    • None
    • 5.15.2, 6.4.1
    • Widgets: Main Window
    • None
    • os:Win7 x64 and Win10 x64

      complier:MSVC2019 x64

      Qt:6.4.1 and 5.15.2LTS
    • Windows

      /*

      os:Win7 x64 and Win10 x64

      complier:MSVC2019 x64

      Qt:6.4.1 and 5.15.2LTS

      Bug Description:when you put close() or QApplication::quit() in mousePressEvent and use RightButton pressed to emit this event,Qt will act close() or QApplication::quit() and extraly active the system right buttton menu as well,which is unexpected.

      This bug appears when QtCreator is minimize in debug mode,at this time the background of the application is system desktop,but when you debug with QtCreator Maximization,it's normal as usual.

      And in release this bug is no limitation ,which happens everytime you click rightbutton.

      */

      //MainWindow directly inherits from QMainWindow,

      //It's a newly built Qt Widgets Application defaultly with mousePressEvent overrided

      void MainWindow::mousePressEvent(QMouseEvent *e)
      {
          if(e->button()==Qt::RightButton)

      {         //close();//same as quit(),when Qt execute close(),System RightButton Menu was activated         QApplication::quit();         e->accept();     }

      }

        1. QTBUG-110830.zip
          2.90 MB
          浩恺 保
        2. test-release-novcredist.rar
          14.06 MB
          浩恺 保
        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
            xiaobao666 浩恺 保
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes