Basically the items in a scene form a tree.
This tree is constructed by passing the pointer of one item as the "parent" of any number of other items.
These items become the "parent" item's "children".
Children are positioned relative to their parent, if you move such a parent item, the children move along with it.
After an items is drawn and its children are then drawn "on top" of it.
So you don't draw a text item on your item, you simply create a text item as a child of your item.
By passing your item as the parent to the text item's constructor, as I wrote in comment #2.
Qt Code:
}To copy to clipboard, switch view to plain text mode
Cheers,
_





Reply With Quote

Bookmarks