View Full Version : how to color the top edge of a rect
dreamer
15th May 2008, 13:58
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.
dreamer
15th May 2008, 14:32
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:
void SubClass::function()
{
BaseClass::function(); // <--
... // do something else
}
dreamer
15th May 2008, 15:15
thx.......:D
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.