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

Performance of MenuItem.highlighted binding

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.7.2
    • Quick: Controls 2
    • None
    • Linux/X11, Windows

    Description

      I noticed a considerable lag when interacting with the Qt Quick Controls Menu both on Windows and Linux. I ran the QML profiler to get some insight what might cause this delay. I observed a strange asymmetry when evaluating the highlighted property of the MenuItem.

      I'm using a custom styled MenuItem with an IconImage for each the indicator and the arrow item. Both have the color property bound like this:

      color: control.highlighted ? "white" : "blue"
      

      According to the QML profiler the binding of the IconImage in the arrow item takes 172µs on average while the binding of the IconImage in the indicator item takes 5.85ms – that's more than 34 times longer.

      While this is not the cause for the lag (it's still there even if I remove the binding) I wonder if this might hint at a hidden problem.

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            gudrian Christian Gudrian
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes