Qt 4.4.3, Windows XP
I used 'search', but didn't find an answer...
Well I need to tune drawing of QLineEdit (I'm subclassing it) so it paints only text (possibly selected) and flicking cursor. No background and no frame. I can disable background with
p.
setBrush(backgroundRole
(),
QBrush(Qt
::transparent));
setPalette(p);
QPalette p = palette();
p.setBrush(backgroundRole(), QBrush(Qt::transparent));
setPalette(p);
To copy to clipboard, switch view to plain text mode
but the thin blue line is still painted. In Qt's source there is:
initStyleOption(&panel);
style
()->drawPrimitive
(QStyle::PE_PanelLineEdit,
&panel,
&p,
this);
QStyleOptionFrameV2 panel;
initStyleOption(&panel);
style()->drawPrimitive(QStyle::PE_PanelLineEdit, &panel, &p, this);
To copy to clipboard, switch view to plain text mode
So is it possible not to draw the frame without total reimplementation of paintEvent (it's rather huge )?
thanks in advance.
Added: sorry, I didn't notice the setFrame
Bookmarks