Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Right click problem in any Qt5 application
Forum Updated to NodeBB v4.3 + New Features

Right click problem in any Qt5 application

Scheduled Pinned Locked Moved Solved General and Desktop
11 Posts 3 Posters 3.7k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi and welcome to devnet,

    IIRC, there was a fix in between. You should check the bug report system.

    In any case, are you experiencing this only on Windows ?

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Sasquash
      wrote on last edited by
      #3

      Hi,

      there's a lot of right click problem in the bug report system, but I don't find any like the one I experienced. The problem still exists in last official version 5.8.0
      and the problem is that right click is not working at all unless the window you click is not focused.

      Yes I only experienced this problem on my old installed windows 10. I made a test on a fresh windows 10 install and there is no problem.

      I don't know if that could help but I discovered this problem on a linux virtual machine running on my windows.
      To run this virtual machine, I used the latest version of virtualbox that is based on Qt 5.6.2
      In the linux virtual machine, I have made some tests that revealed that mouse right click was received as some keyboard events.

      K 1 Reply Last reply
      0
      • S Sasquash

        Hi,

        there's a lot of right click problem in the bug report system, but I don't find any like the one I experienced. The problem still exists in last official version 5.8.0
        and the problem is that right click is not working at all unless the window you click is not focused.

        Yes I only experienced this problem on my old installed windows 10. I made a test on a fresh windows 10 install and there is no problem.

        I don't know if that could help but I discovered this problem on a linux virtual machine running on my windows.
        To run this virtual machine, I used the latest version of virtualbox that is based on Qt 5.6.2
        In the linux virtual machine, I have made some tests that revealed that mouse right click was received as some keyboard events.

        K Offline
        K Offline
        koahnig
        wrote on last edited by
        #4

        @Sasquash

        There is a difference between Qt libraries version 5.8 and Qt creator versions (probably 4.2 at the moment). Qt libraries are updated separately from Qt creator.

        If you are experiencing a bug in Qt creator, you need to check for its version number.

        Vote the answer(s) that helped you to solve your issue(s)

        S 1 Reply Last reply
        0
        • K koahnig

          @Sasquash

          There is a difference between Qt libraries version 5.8 and Qt creator versions (probably 4.2 at the moment). Qt libraries are updated separately from Qt creator.

          If you are experiencing a bug in Qt creator, you need to check for its version number.

          S Offline
          S Offline
          Sasquash
          wrote on last edited by
          #5

          @koahnig No, the bug is not in QtCreator, I have the same problem with other Qt5 applications. It is just easy to reproduce the problem with QtCreator as it is included in every Qt installation.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            Sasquash
            wrote on last edited by
            #6

            Hi, I have made deep investigations to find from where the problem come from and what I discovered is unbelievable.

            Now I can say that the problem is not due to Qt libraries, because I manage to produce an executable that has this "right click" problem but that is not linked dynamically with Qt libraries.

            I just made a small code using only winapi function (CreateWindowEx, RegisterClass, ShowWindow, SetWindowText ), that create a window, register a class to get window message, show the window and display the window message value in its window title.

            If the class name used in RegisterClass call is "Qt5QWindowIcon" then the application has the "right click" problem.

            Qt5 librairies use this class name since version 5.1.0, previous version use "Qt5QWindow".
            This name is build in QWindowsContext::registerWindowClass method in qwindowscontext.cpp.

            I still do not understand why this happens only on my system.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #7

              Then it look worth opening a report with your findings. Don't forget to include your test project.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • S Offline
                S Offline
                Sasquash
                wrote on last edited by
                #8

                Done ! QTBUG-60340

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #9

                  Thanks !

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    Sasquash
                    wrote on last edited by
                    #10

                    Problem is solved, I have installed long time ago, an Android Emulator name Andy (version 41.1010) that use Qt5 librairies. This installation launch an executable named HandyAndy.exe at windows startup. This executable was the cause of the right click problem, it had to catch mouse event using the class name and change it in keyboard event.
                    The latest version of this emulator (version 46.16) do not have this problem.

                    1 Reply Last reply
                    2
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #11

                      Thanks for sharing your findings !

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved