Solved scroll of the textBrowser
-
@mrjj No, the same style, if you see, the style in the two photos is different
-
@kenchan in the code how must I write?
-
@vale88
Usually after you have created the instance of the QApplication object, then call the setStyle("fusion"); of the app object.
something like myapp->setStyle("fusion");
see it in the docs here -
@kenchan it doesn't work
-
Hi! If you just want to set the default style for scrollbar, then put this code in your stylesheet and add to
qApp->setStyleSheet()
or set it to the widget usingsetStyleSheet
method:QScrollBar:horizontal { background-color: none; } QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal { background: none; } QScrollBar:vertical { background-color: none; } QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { background: none; }
This will be the default scrollbar.
-
@Cobra91151 yes but this code how must I write it?Because I have a textBrowser
-
I just described above, there are two options:
- Make it global for all scrollbars across your app using
qApp->setStyleSheet()
- Make it only for the
textBrowser
(textBrowser->setStyleSheet()
)
Choose what you want.
- Make it global for all scrollbars across your app using
-
@Cobra91151 but all the code with ""?
-
@Cobra91151 thanks a lot, it works
-
Ok. So, make it solved then.