[SOLVED] Need some help on providing a Head's Up Display - When Hovering over a Pushbutton - Display Information Onto a small Popup screen with its on
-
Hello
First of all, thanks for taking the time to read through my post. I am developing an application for which I need to provide the following feature.I have a Locker Section, wherein there are several pushbuttons with locker nos (1-48) marked on it. When I hover over the pushbutton, there should be a small popup window with its snap point on the cursor(mouse), displaying information such as Member ID, Start Date etc.,
I have done the following tasks.
-
Subclassed QPushbutton and re-implemented a mypushbutton class with QEVents (Enter and Leave Events ) worked out. I am able to display the pushbutton's names here, but i am unable to pass these names to the main class (called widget).
-
How do I place a small screen that pops up, snaps one edge on the mouse pointer.
Your valuable guidance will be truely appreciated.
Thanks.
-
-
Maybe you can use a "QToolTip":http://doc.qt.nokia.com/4.7-snapshot/qtooltip.html#details for that. Note that it supports rich text, i.e. different fonts, linebreaks, colors, etc. So should be enough for displaying the data you want.
Also see the "tool tips example":http://doc.qt.nokia.com/4.7-snapshot/widgets-tooltips.html.
-
thanks for the tip. will venture on that path
-
Maybe it is already enough to call @buttonX->setTooltip("some formated text");@ on each of your button.
-
Thanks for the reply guys. I went down the path suggested by DerManu. It Worked. Thanks a lot. Now whenever I hover over a pushbutton, I am able to put data into a tooltip.