QTextEdit Look
-
I am using a QTextEdit to log messages. The widget has to resize as new messages are logged, which it does, but I don't like the look of the scrollbar. Is there a simple way to get the same scrollbar style that QScrollArea uses?
Or is there another widget that can accomplish the same and has the QScrollArea scrollbar? -
Ok, thank you for your help.
-
@Herman-Nordberg said in QTextEdit Look:
Is there a simple way to get the same scrollbar style that QScrollArea uses?
normally they have the same scrollbar style, since its the same QStyle subcontrol during painting.
What platform?
Did you maybe apply a stylesheet?
Can you post a screenshot? -
You are right, it was because of a stylesheet, removing it results in a normal scroll bar.
So I can not apply a stylesheet or is there some way? I only really want to change the border and font. -
@Herman-Nordberg said in QTextEdit Look:
So I can not apply a stylesheet or is there some way? I only really want to change the border and font.
I guess as soon as you style the border of the QTextEdit all of it's subcontrols also get painted by the stylesheet style.
You can try to wrap your QTextEdit in a plain QFrame, set an objectName on it and explicitly only style this QFrame widget instead of the QTextEdit widget. -
Ok, thank you for your help.