How to write descriptions for elements in the interface window
-
wrote on 27 Mar 2012, 12:18 last edited by
Hi guys,
On my interface window i got drop down lists, radio boxes and all sorts of thigs. And i want to write some descriptions for the user explaining what each element does. Is it possible to write descriptions for them once you move your mouse over them a description buble would come up to explain what it does?
Thanks
-
wrote on 27 Mar 2012, 12:38 last edited by
There's a member function in all QWidget controls called setToolTip(QString ...).
@
QPushButton *button = new QPushButton;
button.setToolTip("If you click this button, the doors of heaven will open for you");
@Cheers :)
-
wrote on 27 Mar 2012, 15:13 last edited by
A thousand thank you's :D it worked like a dream, i got another question if you don't mind, how would you do the same thing for a each tab in a tab-widget? i mean write description for each separate tab?
-
wrote on 27 Mar 2012, 15:35 last edited by
If there would be a way, it would be the same. Just use setToolTip on the QTabWidget object you have. I think you have to point your mouse on the top of your QTabWidget, where you select the tabs.
-
wrote on 27 Mar 2012, 15:38 last edited by
Tooltip is one solution, you can also put the description text on mouse over in the main window status bar, it is a common and a little less intrusive approach.
-
wrote on 27 Mar 2012, 16:02 last edited by
Thanks guys :D it worked.
Btw I am making an openGL teaching tool and I am not a super creative person, would any of you be interested in testing my interface once I got it up and running?I would love to get some feedback to see if I am doing an ok job.
Thanks for all of your help =]
3/6