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. How can I slow down the scroller speed if the scroll area is small
Forum Updated to NodeBB v4.3 + New Features

How can I slow down the scroller speed if the scroll area is small

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 321 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.
  • MihanM Offline
    MihanM Offline
    Mihan
    wrote on last edited by
    #1

    Hi all

    I try makeing a scroller for my combo box.
    e.g.

    // based QComboBox 
    
    setStyleSheet("QComboBox{combobox-popup:0;}"
    QScroller::grabGesture(view(), QScroller::LeftMouseButtonGesture);
    setMaxVisibleItems(5);
    
    
    //add many items
    for(int n = 0; n < 100; n++)
    {
        addItem(...)
    }
    

    I find it will scroll very fast even if I just move a few pixels, and it seems to scroll with each item ( not each pixels).
    I find QScrollerProperties, how to use it or should say which param should I change?

    Best regards
    Mihan

    1 Reply Last reply
    0
    • JoeCFDJ Offline
      JoeCFDJ Offline
      JoeCFD
      wrote on last edited by
      #2

      https://doc.qt.io/qt-5/qscrollerproperties.html#FrameRates-enum
      Default one is 60. Try to set it to 20 and see if it helps.

      1 Reply Last reply
      0
      • MihanM Mihan has marked this topic as solved on

      • Login

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