January 17, 2012

AcerExtensa AcerExtensa
Hobby Entomologist
665 posts

[SOLVED] QStatusBar - Permanent widget on the left

 

Hallo everybody,
do anybod know how to add permanent widget(QLabel) to statusBar on the left side without reimplementing paintEvent? I need to add small icon to status bar on the left side of statusbar message…. widget added with addWidget will be removed next time status bar message comes…

 Signature 

God is Real unless explicitly declared as Integer.

8 replies

January 17, 2012

stima_ua stima_ua
Lab Rat
71 posts

void QStatusBar::addPermanentWidget ( QWidget * widget, int stretch = 0 )

January 17, 2012

AcerExtensa AcerExtensa
Hobby Entomologist
665 posts

addPermanentWidget adds widget on the right side! I need permanent widget on the left side

 Signature 

God is Real unless explicitly declared as Integer.

January 17, 2012

Volker Volker
Ant Farmer
5428 posts

A widget containing the label and an expanding spacer in a layout?

January 18, 2012

AcerExtensa AcerExtensa
Hobby Entomologist
665 posts

QStatusBar::showMessage doesn’t draws message then…

I’ve just subclassed QWidget and draw content by myself… But where is another thing i need to fix: QStatusBar draws some kind of vertical and horizontal line on the right of my widget. How do I get this off?

StatusBar

 Signature 

God is Real unless explicitly declared as Integer.

January 18, 2012

Volker Volker
Ant Farmer
5428 posts

Sorry, I have no idea…

January 18, 2012

stima_ua stima_ua
Lab Rat
71 posts

December 28, 2013

gtpt gtpt
Lab Rat
13 posts

Hi
I know this is an old thread, but i came across the same problem.
I do i get read of that vertical line?

January 10, 2014

gtpt gtpt
Lab Rat
13 posts

Found it …
Just add:

  1. QStatusBar::item {border: none;}

… to the application stylesheet.

 
  ‹‹ [SOLVED] QSlider don’t react on mouse wheel      Detecting lines and/or colors on an SVG (or other vector graphics) file ››

You must log in to post a reply. Not a member yet? Register here!