View Full Version : Round ended edges
merry
8th August 2007, 08:48
Hi all :)
Working on Qt4.2 on Intel MAC
Can anybody tells me that is there a way to make the round edges for QMainWindow.,QTextEdit ,QFrame , QGroupBox .just Like there is for QPushButton..
Thanx
wysota
9th August 2007, 00:41
You'd have to reimplement the style and draw all the widgets yourself. And if you want to preserve the Aqua look of your MAC, I don't think it's possible on Qt side at all. You'd have to tweak your system settings, I guess... Or just change the widget style and use style-sheets to apply roundness to widget borders (but I don't think that's what you want).
merry
9th August 2007, 11:38
You'd have to reimplement the style and draw all the widgets yourself. And if you want to preserve the Aqua look of your MAC, I don't think it's possible on Qt side at all. You'd have to tweak your system settings, I guess... Or just change the widget style and use style-sheets to apply roundness to widget borders (but I don't think that's what you want).
Thanx 4 d Reply,
By Mistake i wrote Qt4.2 , Actully I am using QT 4.1 , on Intel MAC.
And I think Qt 4.1 doesn't support style-sheets.
Is there any other way to change the looks of QMainWindow and other widgets..
You'd have to reimplement the style and draw all the widgets yourself.
As u said , I mean How can I reimplement the styles.....Can you explain it to me with an example.
Thanx
wysota
9th August 2007, 13:15
Take a look at the docs for QStyle. There should be a link to an example that reimplements a style. And remember it won't work for top level windows. For those you can use QWidget::setMask().
merry
9th August 2007, 13:25
Thanx 4 d reply
Orginally Posted by Wysota:
Take a look at the docs for QStyle. There should be a link to an example that reimplements a style. And remember it won't work for top level windows. For those you can use QWidget::setMask().
By using setMask ; we can set the Bitmap or any region for the widget, But I want to change the shape of the widget , i.e I want to make the edges of the widget "round".
cheers
wysota
9th August 2007, 22:31
The bitmap says whether a particular pixel of the widget should be visible or not. If you clear bits of the mask responsible for corners of the widget, you'll get rounded top-level widgets. Just make sure to adjust the mask when the window gets resized.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.