[Interest] QGraphicsWidget and custom QToolTip
Petric Frank
pfrank at gmx.de
Wed Jan 22 18:40:43 CET 2014
Hello Oliver,
Am Mittwoch, 22. Januar 2014, 08:21:11 schrieb Till Oliver Knoll:
> Am 21.01.2014 um 20:25 schrieb Petric Frank <pfrank at gmx.de>:
> > ...QGraphicsWigdet. Only texts (w/ reduced HTML) can be
> > passed to the setTooltip method.
The class i meant QGraphicsItem, not QGraphicsWidget - my mistake.
> Haven't tried it, but wouldn't it be possible to define an <img> tag then
> which references an /embedded/ QPixmap (which would have to be dynamically
> created, off course - somehow).
Exactly what may solve my problem. How this <img> tag must be crafted. And how
the c(++) code must look like to be referred ?
So having in the code an QPixmap instance like
QPixmap pixmap;
filled with the drawing i wnt to have.
How to refer it ?
> > ...
> > Or is it - in this case - allowed to include the private header ?
>
> It is always "allowed" to include whatever you want (at least in the Qt
> world anyway - some other companies have a different view on that topic
> when it comes to "App Store Rules" ;)), as long as you remember what
> "private" implies: "You're on your own!"
Thats the reason i want to avoid it.
> So the only one who might "punish" you is your compiler once those private
> headers change...
exactly.
> That said, if you have a valid use case and the private API call does work,
> you could make a "feature request" - or even better: provide your own Qt
> changes to the project for review :)
If there is no other way i may go on this track.
The use case may be a genealogy tree and display a picture of the member
(together with additional info) when hovering a mouse over it. The picture is
placed in a database, so not referrable by ordinary <img> tags.
regards
Petric
More information about the Interest
mailing list