How can i color the top edge of my custom QGraphicsRectItem......?????
i perhaps guess reimplementing the paint() event........
Can i have an example??
How can i color the top edge of my custom QGraphicsRectItem......?????
i perhaps guess reimplementing the paint() event........
Can i have an example??
There's an example in QGraphicsItem::paint() docs.
J-P Nurmi
reimplementing the paint() virtual function, i obtain my behaviour but then i can't set other parameters like the color inside my rect.
I'd just like to color the top edge of my rect and to leave the building of the other attributes to its parent class.......
Call the base class implementation:
Qt Code:
void SubClass::function() { BaseClass::function(); // <-- ... // do something else }To copy to clipboard, switch view to plain text mode
J-P Nurmi
thx.......
Bookmarks