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. QPushButton clicked() problem in Qt5 when pushing two buttons simultaneously

QPushButton clicked() problem in Qt5 when pushing two buttons simultaneously

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 1.6k Views 1 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.
  • D Offline
    D Offline
    dieu7
    wrote on last edited by
    #1

    Hi,

    I ran into a problem with QPushButtons on a touch screen device when I upgraded my application from Qt 4.8.4 to 5.8.0.

    Preconditions:

    • Two QPushButtons
    • Touch screen device

    Steps to reproduce:

    • Try to push both buttons at the same time

    Expected result:

    • One of the buttons emits pressed(), released(), and clicked() signals in sequence, the other button emits nothing
    • This is how it worked in Qt 4.8.4

    Actual result:

    • One of the buttons emits pressed(), and no other signals are emitted
    • That button stays down even though it is not a checkable button
    • If I now push the same button again, it emits released() and clicked() and pops up
    • If I instead click somewhere else on the screen, the button emits only released() and pops up
    • This is how it now works in Qt 5.8.0

    This is really easy to reproduce, happens almost every time I try it. And like mentioned, the same code works without problems in Qt 4.8.4.

    Any ideas, what has changed here? Is there some property whose default value has been changed in Qt 5, which affects this?

    K 1 Reply Last reply
    0
    • D dieu7

      Hi,

      I ran into a problem with QPushButtons on a touch screen device when I upgraded my application from Qt 4.8.4 to 5.8.0.

      Preconditions:

      • Two QPushButtons
      • Touch screen device

      Steps to reproduce:

      • Try to push both buttons at the same time

      Expected result:

      • One of the buttons emits pressed(), released(), and clicked() signals in sequence, the other button emits nothing
      • This is how it worked in Qt 4.8.4

      Actual result:

      • One of the buttons emits pressed(), and no other signals are emitted
      • That button stays down even though it is not a checkable button
      • If I now push the same button again, it emits released() and clicked() and pops up
      • If I instead click somewhere else on the screen, the button emits only released() and pops up
      • This is how it now works in Qt 5.8.0

      This is really easy to reproduce, happens almost every time I try it. And like mentioned, the same code works without problems in Qt 4.8.4.

      Any ideas, what has changed here? Is there some property whose default value has been changed in Qt 5, which affects this?

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

      @dieu7

      Sounds strange and is IMHO a bug in Qt 5.

      However, this forum is not monitored for bug reports. You need to check with JIRA and file eventually a bug report there.

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

      1 Reply Last reply
      1
      • D Offline
        D Offline
        dieu7
        wrote on last edited by
        #3

        I agree, sounds strange and maybe a bug. I'm just surprised that I haven't found any similar problem descriptions anywhere yet. I'll add a bug in JIRA, if I can't find anything related to this with some more extensive searching.

        However, I would also appreciate it if someone has the time and interest to try this in some other environments, maybe with other Qt versions as well. I reduced the problem to a minimal test application, which I'll attach here.

        Seems like I don't have privileges to upload files, so I added the zipped code files to OneDrive: https://1drv.ms/u/s!Ag3FT119iSn0gR22nOOKajHiLFHH

        1 Reply Last reply
        1

        • Login

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