Hi,
what I want achieve is that a checked item in a QTreeWidget which has lost focus is displayed as it has focus. A checked item in a focused QTreeWidget has - on my desktop - a blue background, but every time i focus any other element in my application the item is still checked, but gets a withe background. That I want avoid.
What I have done so far:
- Create a custom style with
to hide ugly focus rectangle of the items. ("files" is the name of my QTreeWidget)Qt Code:
void myStyle::drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const { }To copy to clipboard, switch view to plain text mode- Forbit that a selection is cleared
Qt Code:
{ if (current) // do some stuff... else ui.files->setCurrentItem(previous); }To copy to clipboard, switch view to plain text mode- always draw selection background for the items.
??? I don't have any idea to achieve that. Must that done in my costum style?
Thanks
Lykurg
Bookmarks