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

When a widget is programatically resized then it will trigger a spontaneous event even though the event did not originate from the system

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.3.0 Beta1
    • Fix Version/s: 5.3.1, 5.4.0
    • Component/s: GUI: Window management
    • Labels:
      None
    • Commits:
      c3e416296a1026d7ba99cf209f5e0720ff5050b1 (6.6.2014, stable, 5.3.1?), a1c5198387fdb7db44a02bb94c56187874e67304 6.6.2014, stable, 5.3.1?) Reverted 5da108a4a76b163116f1b816090075a9b86cf077 9c80a3be4b3beb28a3a6bda717c15b0ded523557 (5.3, 13.6.2014)

      Description

      Description

      When a widget is programmatically resized then it will trigger a spontaneous event even though the event did not originate from the system. Attached is an example that reproduces this by way of a timer using addWidget() on a layout.

      Changes:

      Approach 1: Do not programmatically generate resize, wait for platform event

      Approach 2: Detect non-spontaneous by checking whether geometry is already correct, suppress platform events in that case

      Approach 3: Suppress non-spontaneous events in the QPA plugins.

      --> Deferred, breaks a lot of tests, initial resize goes missing.

      Approach 4: Let the QPA plugins determine spontaneity

        Attachments

        1. main.cpp
          0.7 kB
        2. qtbug38768.zip
          1 kB

          Issue Links

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

            Activity

              People

              Assignee:
              jolind Jorgen Lind
              Reporter:
              andysh Andy Shaw
              Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: