PDA

View Full Version : Status Bar in a SUB WINDOW.



Cutey
22nd July 2008, 06:29
Hi Folks,

I'm trying to implement Status Bar in a SUB WINDOW.
The problem is the expected messages are not displaying in the Status Bar.

Constructor Code:



QVBoxLayout *mainLayout = new QVBoxLayout;

QCheckBox checkbox = new QCheckBox(tr("Item #01"));
checkbox->setToolTip( tr("This is the Tool Tip for Check Box") );
checkbox->setStatusTip( tr("This is the status tip for Check Box ") );
mainLayout->addWidget(checkbox);

QWidget *stBar = new QStatusBar(this);
stBar->setBaseSize(100,200);
mainLayout->addWidget(stBar);


In the above code I could see the Tool Tip but not the Status Bar.

Any Help/Suggestions ..???

Thanks in Advance..........

aamer4yu
22nd July 2008, 09:30
What do u see ? Can u show us a snapshot of the same ???
Also the line -

QWidget *stBar = new QStatusBar(this);
shoudnt it be -

QStatusBar *stBar = new QStatusBar(this);
:confused:

Also status bar is usually used with QMainWindow or its subclasses. If you want to show only some message, you cud very well use QLabel to show ur messages.

Cutey
23rd July 2008, 07:09
Thanks for your suggestion...
I getting status Bar in the SUB WINDOW but no display messages.

Note:
I tried to upload the screen shot but I couldn't make it...

Cutey
23rd July 2008, 07:42
Could you please explain how to display a message about the WIDGET in a LABEL in which mouse cursor is pointing to ..?