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. Is it slow to constantly change the number of items in a QCombobox ?

Is it slow to constantly change the number of items in a QCombobox ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 6 Posters 607 Views 2 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.
  • S Offline
    S Offline
    SuperSelrak
    wrote on last edited by
    #1

    I have a step-based application that reads data and displays it depending on certain buttons and combo boxes and other GUI stuff.

    One of the important aspects is how fast the data can be read and visualized. It is meant to be viewed in real-time or even faster, at least in a very continuous way, no with a long pause in between steps. Of course it is always possible to pause to zoom in and stuff, but it is the live view when playing through the data which is important. A confortable playing speed is at 25 steps per second, up to 75 is still confortable (after that it becomes too fast for proper viewing).

    The catch is the following : strictly speaking, I need to adapt the buttons and combo box items to the specific data of every step. Is this very slow to do, in general ?

    I can instead have the combo boxes always have the max number of items, and some will just display nothing if chosen at some steps. Same for buttons : they can all be enabled all the time, and some will just do nothing when clicked at some steps. Would this be a lot faster when playing ?

    I am talking about ~10 buttons and ~5 combo boxes with ~10 items each.

    jsulmJ GrecKoG 2 Replies Last reply
    0
    • S SuperSelrak

      I have a step-based application that reads data and displays it depending on certain buttons and combo boxes and other GUI stuff.

      One of the important aspects is how fast the data can be read and visualized. It is meant to be viewed in real-time or even faster, at least in a very continuous way, no with a long pause in between steps. Of course it is always possible to pause to zoom in and stuff, but it is the live view when playing through the data which is important. A confortable playing speed is at 25 steps per second, up to 75 is still confortable (after that it becomes too fast for proper viewing).

      The catch is the following : strictly speaking, I need to adapt the buttons and combo box items to the specific data of every step. Is this very slow to do, in general ?

      I can instead have the combo boxes always have the max number of items, and some will just display nothing if chosen at some steps. Same for buttons : they can all be enabled all the time, and some will just do nothing when clicked at some steps. Would this be a lot faster when playing ?

      I am talking about ~10 buttons and ~5 combo boxes with ~10 items each.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @SuperSelrak Do you mean you want to update content of buttons and combo boxes at 25-75Hz?! Not sure what the use case is to do something like this - isn't it very irritating for the user if the content of a combo box is constantly changing?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      JonBJ Pl45m4P 2 Replies Last reply
      2
      • jsulmJ jsulm

        @SuperSelrak Do you mean you want to update content of buttons and combo boxes at 25-75Hz?! Not sure what the use case is to do something like this - isn't it very irritating for the user if the content of a combo box is constantly changing?

        JonBJ Online
        JonBJ Online
        JonB
        wrote on last edited by JonB
        #3

        @jsulm Absolutely my thought too. A combo is for a user to pull down, look at the items, maybe scroll, and pick one. Cannot imagine what one would want to be updating such an interactive widget for.

        1 Reply Last reply
        0
        • jsulmJ jsulm

          @SuperSelrak Do you mean you want to update content of buttons and combo boxes at 25-75Hz?! Not sure what the use case is to do something like this - isn't it very irritating for the user if the content of a combo box is constantly changing?

          Pl45m4P Offline
          Pl45m4P Offline
          Pl45m4
          wrote on last edited by
          #4

          Besides that, I think you cant even click what you wanted to. You move your mouse to the button or combobox and on its way, its function has changed 5 times or the button is gone


          If debugging is the process of removing software bugs, then programming must be the process of putting them in.

          ~E. W. Dijkstra

          1 Reply Last reply
          1
          • S Offline
            S Offline
            SuperSelrak
            wrote on last edited by
            #5

            The buttons are not used when playing. Only when paused. Most of them would not visibly flicker, though some may.

            C 1 Reply Last reply
            0
            • S SuperSelrak

              I have a step-based application that reads data and displays it depending on certain buttons and combo boxes and other GUI stuff.

              One of the important aspects is how fast the data can be read and visualized. It is meant to be viewed in real-time or even faster, at least in a very continuous way, no with a long pause in between steps. Of course it is always possible to pause to zoom in and stuff, but it is the live view when playing through the data which is important. A confortable playing speed is at 25 steps per second, up to 75 is still confortable (after that it becomes too fast for proper viewing).

              The catch is the following : strictly speaking, I need to adapt the buttons and combo box items to the specific data of every step. Is this very slow to do, in general ?

              I can instead have the combo boxes always have the max number of items, and some will just display nothing if chosen at some steps. Same for buttons : they can all be enabled all the time, and some will just do nothing when clicked at some steps. Would this be a lot faster when playing ?

              I am talking about ~10 buttons and ~5 combo boxes with ~10 items each.

              GrecKoG Offline
              GrecKoG Offline
              GrecKo
              Qt Champions 2018
              wrote on last edited by
              #6

              @SuperSelrak said in Is it slow to constantly change the number of items in a QCombobox ?:

              Is this very slow to do, in general ?
              Would this be a lot faster when playing ?

              You tell us.
              If the answer is yes, you'll have to add some additional logic to debounce or throttle the values for the combobox. If it's no you can use a naive implementation without additional work.

              So the best way of action seems to be try the easy way first, figure out if it is okay or too slow and adapt it only if necessary.

              You could use tools like Hotspot if under Linux (similar tools exist on mac or windows) to help you analyze the performance of your app.

              1 Reply Last reply
              0
              • S SuperSelrak

                The buttons are not used when playing. Only when paused. Most of them would not visibly flicker, though some may.

                C Offline
                C Offline
                ChrisW67
                wrote on last edited by
                #7

                @SuperSelrak

                The buttons are not used when playing. Only when paused.

                So update them once only when playing is paused.

                1 Reply Last reply
                4

                • Login

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