My users want a graphical representation instead of a tooltip, i.e. a tooltip-looking hovering rectangle that shows the detailed information of a node as a graphical representation.
I have looked into the sourcecode of qtooltip.cpp and was thinking of making a similar class. As QToolTip is tailored to create a QLabel that shows text, I plan to subclass QGraphicsView and show this as a hovering rectangle with no frame-fluff.
Is that the right class to start with? Any other tips? Any other baseclass that is better for this purpose?
And I noticed that QToolTip have a separate internal singleton class QTipLabel. Is that really necessary? Shouldn't my class be able to make an instance of itself if necessary? Or is it much cleaner to maybe not subclass the access class, but rather subclass the extra singleton class from QGraphicsView (or some other class)?
I plan to have the same type of static function GraphicalTooltip::showGraphicalTooltip(Node*, Widget*) to ease the use.
Bookmarks