QStyle: draw QLineEdit like box
Hello together!
i am trying to draw a sunken border frame with white background, something looking like QLineEdit. This is the code i came up with after quite some experimenting and qt-source digging:
Code:
option.initFrom(this);
option.
state |
= QStyle::State_Sunken;
option.rect.setRect(x,y,width,height);
Problem is that the white panels edges are not rounded (i am using KDE oxygen style) like the frame and are visible outside the frame at the edges. Just a few pixels, but that looks ugly! Any idea whats wrong with this code?
And another problem that came up in this respekt: how can i draw the focused and mouse_over states? It seems they are not drawn by PE_FrameLineEdit itself and PE_FrameFocusRect primitive does nothing for me.
Thanks for any help,
Stefan