Hi JCarpenter,
I met exactly same issue as you did.
I tried to subclass QTextEdit:: paintEvent() and do the border painting work myself,
but I found QTextEdit:: paintEvent is actually the Paint handler for QTextEdit::viewport() who has installed an eventfilter, NOT for painting QTextEdit itselft.
On my way of testing I found a solution
bool AttachmentListEdit
::event(QEvent* e
) {
#ifdef Q_OS_WIN
switch (e->type())
{
// skip QFrame::paintEvent() to prevent buggy border painting
e->accept();
return true;
default:
break;
}
#endif
}
bool AttachmentListEdit::event(QEvent* e)
{
#ifdef Q_OS_WIN
switch (e->type())
{
case QEvent::Paint:
// skip QFrame::paintEvent() to prevent buggy border painting
e->accept();
return true;
default:
break;
}
#endif
return QTextEdit::event(e);
}
To copy to clipboard, switch view to plain text mode
Though it works for me, I can not explain it exactly.
I've no idea who finally paint the border but I'm going to dig out.
I'm using Qt4.7.4
Bookmarks