Hi all,
probably my question is very platform dependent but I'd like to know how can I have a skinned frame for my dialogs, just like Microsoft Messenger.
Thanks for any tips on that
Bye
Hi all,
probably my question is very platform dependent but I'd like to know how can I have a skinned frame for my dialogs, just like Microsoft Messenger.
Thanks for any tips on that
Bye
This is not platform specific - try to subclass QStyle. The style example shows how to implement norwegian wood, try starting from that.
thanks, I already use QStyle for customize widgets but I guess there's no way to customize application frame.
There is a way. U have to use native support and in there draw primitive element PE_CustomBase and than in drawPrimitive draw anything on it.
thanks for answering, this sounds very interesting to me, but I cannot figure it out how to do that.
One way could be to draw my window frameless and the draw by myself the window caption, but maybe there's a better way to do that
thanks,
bye
This is how microsoft does it. (Windows media player, Live messenger, Office 12, etc). So still a dirty hack, but now endorsed by microsoft!One way could be to draw my window frameless and the draw by myself the window caption, but maybe there's a better way to do that
Thanks for your answer, I'll try to do that. However I thought there someone had already tried to have such kind of dialogs in Qt.
Bye
Hi, Did you find a solution, im trying to do the same thing, with resizing support?
Any example that i could find to do this?
Making your dialogs frameless, then drawing your own frame, is the best way. I have never done this directly, but I have done similar things writing an X11 window manager. Here's a brief overview:
1) Create a widget called WindowFrame
2) Give it a 3x3 grid layout
3) Put your dialog in the center
4) In WindowFrame:aintEvent(), draw corner pixmaps in the corner, and tilable edge pixmaps on the edges
5) To make it resizable, implement mousePressEvent() and mouseMoveEvent()
The inclusion of titlebar and title buttons I leave an an exercise to the reader.
Hi, Thanks for the suggestions. I did what you say and it work.
The only problem that i had now is clipping the transparent part of the borders, so its actually round, and not black(it show transparent color as black)
I read that i can accomplish this with a mask, but i don't know how to add a mask to the widget, just to the particular corners.
All the different borders are separate images, and i have to join them some how, and then apply the mask to the widget
Any help with this???
thanks in advance!
CJC
HI, i kind of fix my issue.
I should use .geometry and not frameRect()
Thanks for all the help
CJC![]()
could anyone post the code for resizing the frameless widget?
i tried this, but till today i've no idea how to implement this by myself...
thanks
one question: with qsizegrip ic can only resize to bottom-left, how can i let it resize to left or right or bottom only?
One can place QSizeGrip to any corner and it will automatically adjust its behavior. For horizontal and vertical resize mode you will need something custom:
I suggest taking a sneak into QSizeGrip sources for more detailed implementation hints.
- catch the point of mouse press event
- resize the window on the fly in mouse move event
J-P Nurmi
kernel_panic (25th June 2007)
i've made up two Skin-Classes (QSkinWidget and QSkinMainWindow) with the behavior like real widgets and windows (moving, resizing, title...) I will put them into the "Software Sektion". Thanks for all help.
Hi, Is there a way to acomplish this with style sheets?
I have my frameless widget, now, is there a way to make its border round using style sheets?
Any help will me much appreciated
Thanks
CJC
Not with style sheets. Better create a custom style for this, but you will have to do the drawing.
Another, way simpler solution is to create a QRegion and apply it as a mask on the dialog. But this will affect the children too( everything that passes outside the bounds will get cut ).
regards
Hi, This post of mine is very beneficial and informative, however there are some specific facts or information that I require. If anyone can help me in this matter then please send me a private message. Best Regards,
Bookmarks