Ok, let's see...
Draw the rectangle and then the labels inside. QSimpleRichText may help you here.Originally Posted by incubator
Label or rectangle?in and how I can detect which one is under the mouse,
If the label, then it'll be quite hard if you use QSimpleRichText, so you'd have to do the layout management yourself and store all coordinates of labels. If the rectangle then that's easy, use QCanvas::collisions().
Make a custom item and use QStyle::drawControl() with CE_CheckBox as a parameter to draw the checkbox. You'll have to do the clicking stuff yourself by checking the coordinates (that's how QCheckBox does that so you can probably take some ideas from its sources).or how to include checkboxes in a qcanvasitem.
You won't get away from that here.Also, I dont like to work with coordinates,
Yes, but... you have to implement it yourselfI was wondering if some sortof layoutmanagement can be used inside a qcanvas![]()
Bookmarks