PDA

View Full Version : how to implement QWhatsThis class



wip123
14th June 2010, 11:02
I want to creat an application ,in whose menu Whatsthis is created and as soon as clicking on it it should display the content what i've written for it like help system.can anybody let me know the related kind of example......this should be implemented using Widgets

aamer4yu
14th June 2010, 12:12
I want to creat an application ,in whose menu Whatsthis is created and as soon as clicking on it it should display the content what i've written for it like help system.
You want a WhatsThis action in menu , and show help when it is clicked ?
Dont you think Help could be a better name ?

or may be I am not able to grasp your requirement properly.

JD2000
14th June 2010, 18:36
I think wip123 is talking about a feature found in some MS software whereby you click an icon - typically a '?' on a toolbar and then click a widget. A dialog then appears with some information about the widget.

An easy way to implement this would be to have the icon set a flag when clicked.

The widget_clicked event could then test this flag and pop up a dialog box accordingly.

sirius
14th June 2010, 23:22
A simple search in the documentation gave this result: http://doc.trolltech.com/4.6/qwhatsthis.html. Happy coding and doc reading ;)

wip123
15th June 2010, 12:47
Ya we can use the help but iit goes away as soon as the user does something else.So I want to set it to the QWhatsThis mode.I'm able to create the action to enter into Qwhatsthis mode but not able to give the help text to get displayed when we click on the menu or tool bar....

I've used setWhatsThis() to give the help text but it's not working?

In the description of class i've seen info about adding text ,it's like -To add "What's This?" text to a widget or an action, you simply call QWidget::setWhatsThis() or QAction::setWhatsThis().

but not getting how to use QAction::setWhatsThis().

can anybody help?