I created a directory named styles in the directory of the program's executable and put the plugin inside it, now it is working. Now I'm 100% sure that it is possible, however it needs more work than stylesheets.
I created a directory named styles in the directory of the program's executable and put the plugin inside it, now it is working. Now I'm 100% sure that it is possible, however it needs more work than stylesheets.
Last edited by Ashkan_s; 22nd October 2012 at 19:52. Reason: spelling corrections
Thanks again, Ashkan_s!
I still don't think that I will be able to convince the right people of the need for a style. At the moment I feel like Stylesheets are the only way for me to get some "wow, nice!" into that application. So I'm still searching for any ideas how to get rid of that strange behaviour.
I noticed something: if i take a QTextEdit with for example 3 lines and start writing into it until the scrollbar appears, than everything looks fine. Once that QTextEdit looses the focus, that ugly 1px line is back. If I then remove enough content for the scrollbar to disappear (focus still inside the QTextEdit) that line is still there. But once the QTextEdit looses focus again: ugly line is gone.
O.o
Just to let you know: i found something that you could call a workaround.
as the unwanted line is colored like the background of the widget, i set the background-color to the border-color (blue) and used a 1x1 pixel image as white background for the widget. As i am using rounded edges it is still visible if you know about the problem but it is still a huge improvement.
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
Qt Code:
{ #ifdef Q_OS_WIN switch (e->type()) { // skip QFrame::paintEvent() to prevent buggy border painting e->accept(); return true; default: break; } #endif }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