PDA

View Full Version : Window Style: No border but resizable



Peppy
8th May 2010, 20:47
Hi guys, I've got problems with MainWindow styling...I need to set up WindowFlags to disable borders but window must be still resizable.
When I tried to use Qt::SplashScreen, Qt::FramelessWindowHint, it was okay but not resizable...When I used Qt::CustomizeWindowHint it was resizable but with border, which is not configurable...How to resolve it? Some WinAPI cheats ? (Yea, this app will runs only on Windows). My current system is Windows XP.

tbscope
8th May 2010, 20:57
Why do you want to do that?

Peppy
8th May 2010, 21:01
I want to make skinable window...do you have any ideas? Maybe it is wrong way...

tbscope
8th May 2010, 22:01
The drawing of the actual windows is not done in Qt but by the window manager of your operating system.
The correct way to skin your windows is to use the style options of your window manager.

If you want to follow general standards, don't mess with how the window manager draws windows.

That said: Create a splash screen type of widget, add a label in the bottom right corner, use the mouse events of that label to resize your parent widget.

tbscope
8th May 2010, 22:20
Also interesting:
http://www.qtcentre.org/wiki/index.php?title=ARGB-Widgets

Peppy
9th May 2010, 18:18
So how do it? By WinAPI yea?

aamer4yu
9th May 2010, 18:21
You wil need to trace mouseEvents on your widget, change the cursor if the mouse in a specific corner.
Then catch mouse press events and resize your widget on mouse move events.