Planned maintenance has been done but it did not solve the problem. So work will continue on this and a new time for trying updates will be announced asap.

how to change delete a scroller of a qscrollBar



  • Hello guys,

    i'm trying to change the width of the scroller of my QScroolBar, for that i used stylesheet and i put at the beginning my width to 0 but i still see the scroller. and even if i put a small value it's not working, it start working after a certain value. i have a range from 0 to 60 and a size of my bar 160.

    so my question is how can we put to 0 my scroller.
    i need to change each time my width!!!

     setStyleSheet(QString("QScrollBar:horizontal{background-color: %2; border: 2px solid %2; border-radius: 1px; margin: 0px; height:15 px;}"
                              "QScrollBar::handle:horizontal{background-color: %1 ; min-width:%3;}"
                              "QScrollBar::add-line:horizontal {border: none; background: none;}"
                              "QScrollBar::sub-line:horizontal {border: none; background: none;}"
                             ).arg(BackgroundGraph, backgroundBar).arg(width));
    

    this is what i got at width=0
    0_1563785636569_Capture.PNG


  • Lifetime Qt Champion

    Hi,

    What exactly are you trying to achieve with that design ?


Log in to reply