PDA

View Full Version : how to implement QDialog StatusBar



umen
26th May 2011, 13:05
i have QDialog that is heavily designed with QDesigner , i saw on the web that i could add QStatusBar with code like this :
http://www.qtcentre.org/threads/10593-QDialog-StatusBar

ts not even working in my case .. maybe the QDialog is already have few layets that holds widget . my question is can i some how use palceholder in the QDesigner or somehow promote widget that place hold the QStatusbar class i don’t know … what can i do in such case? can i implement new QStatusbar?
Thanks

Santosh Reddy
27th May 2011, 05:49
ts not even working in my case .. maybe the QDialog is already have few layets that holds widget
What is not working, post a sample how you did. I know the referred post, but someone can help you only if you give some information about what you did. What you tried, which part is not working etc.


my question is can i some how use palceholder in the QDesigner or somehow promote widget that place hold the QStatusbar class i don’t know … what can i do in such case? can i implement new QStatusbar?
I suspect that it may not be possible to promote a QWidget to a in built type (QStatusBar in your case), using QtDesigner.
What you can do is, place a place holder QWidget in QtDesigner, and access this QWidget from your code and place a QStatusBar in side it as a child widget (using a QLayout). Then use
QStatusBar::clearMessage () and QStatusBar::showMessage () (either connect some signal, or directly call them) to display your status messages.

finally here is the code, showing what I mean 6482