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 to change delete a scroller of a qscrollBar
Forum Updated to NodeBB v4.3 + New Features

how to change delete a scroller of a qscrollBar

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 247 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.
  • B Offline
    B Offline
    benamiar
    wrote on last edited by benamiar
    #1

    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

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What exactly are you trying to achieve with that design ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1

      • Login

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