[solved] QStatusBar add a widget without a frame/border
-
When adding a widget to QStatusBar such as a QLabel, it is shown with a frame.
Is there a way to add a widget to the status bar without the border / frame?
Or is inheriting QStatusBar and overriding render() the only possibility?
-
Hi,
You could try using a stylesheet like described "here":http://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qstatusbar
Hope it helps
-
Yes, that's just what I needed :)
Thanks for the tip!Adding:
@ qApp->setStyleSheet( "QStatusBar::item { border: 0px}" ) ;@Removed the border from the widgets in the status bar.
Thanks again :) -
You can insert QLabel without frame afaik, there's no need for using stylesheet. Just set Shape to QFrame::NoFrame. See http://qt-project.org/doc/qt-4.8/qframe.html#Shadow-enum
-
Yes, I see, of course if you insert a custom QWidget you automatically get a frame, even if the custom widget does not inherit from QFrame.
But I'll keep that in mind for other standard widgets that I might add to the status bar.
:) Thanks for your help.