Status bar message tend to disappear
Hi,
I have a custom MainWindow class coded by hand, not .ui file used.
I display a sample message:
statusBar()->showMessage(tr("----- This is status bar position -----"));
It's shown ok. When I move mouse over a menu the message disappears.
This is the only line when I use the statusBar.
[*]
When I add a widget to the status bar and set its test( Qlabel) then the message is the same []
Thanks
Re: Status bar message tend to disappear
those messages are not permanent; have a look at QStatusBar::addPermanentWidget()
You can add a QLabel to a QStatusBar and set that label's text instead.
HTH
Re: Status bar message tend to disappear
That's the normal behavior, because actions provide further explications in the status bar. If you want a permanent message use
Re: Status bar message tend to disappear
Ok, thank you.
I have done it this way.
I am thinking what are those:
Quote:
actions provide further explications in the status bar
Re: Status bar message tend to disappear
I tried this maneuvre on a local status bar I have on each of my "tab" widgets (widgets within a QTabWidget). This local status bar does not behave like the main window status bar. The local messages only appear if the mouse hovers over the "tab" widget and while the mouse is over the "tab" widget the messages do not update. I'm doing tabbed searching of the local file system such that each "tab" widget (containing a QTreeView) performs a distinct search. I need the filepaths to permanently, and possibly rapidly, display and update on the local status bar regardless of the mouse position as I traverse the filesystem. Any ideas?