Originally Posted by
Bill
Hello,
It's my first post here, so sorry if I'm starting a thread which already has been answered. I googled for the answer, but found nothing useful...
Next time also use the board search function
Two possibilities:
- Create your own QStyle
- reimp the paint function with
if (option
& QStyle::State_HasFocus) {
// draw a custom selection rect
}
// remove the selection flag and call the base implementation
o
->state
&= ~
QStyle::State_HasFocus;
if (option & QStyle::State_HasFocus)
{
// draw a custom selection rect
}
// remove the selection flag and call the base implementation
QStyleOptionGraphicsItem *o = const_cast<QStyleOptionGraphicsItem*> (option);
o->state &= ~QStyle::State_HasFocus;
QGraphicsRectItem::paint(painter, o, widget);
To copy to clipboard, switch view to plain text mode
Bookmarks