I am developing my Python app with PyQt4 and I want to customize my app interface (QMainWindow, QLineEdit and so forth) in windows like this view (or something else):
Instead of this (default style on Windows 10):
I am developing my Python app with PyQt4 and I want to customize my app interface (QMainWindow, QLineEdit and so forth) in windows like this view (or something else):
Instead of this (default style on Windows 10):
For all styles except the window frame border use Qt stylesheets (QSS) (Documentation).
For the frame borders it's a bit difficult:
See the Qt window flags example to see what Qt can do with the window frame.
Basically you cannot style the window frame (they take the style from the OS), but you can hide/show buttons and you can show the window completely frameless.
On Windows however, some people hacked into the windows frame bar (Tabs in title bar: what's the secret?). This may be possible to do with Python too.
The most universal approach would be (although this is a bit costly) to not using any OS provided frame (Qt::CustomizeWindowHint
) and then inside implement your own styled frame implemented drag and drop of the title bar and border and so forth.
With this you can easily achieve every possible frame border including your example, but you have to re-implement the buttons and the dragging behavior and the response might be a bit less quick than usual. Also the look and feel will then not be OS specific out of the box as it is for Qt's own frame borders.
For example in Linux, the title bar is typically shown differently when maximized - you wouldn't have this then.
Example of custom made frame bar: Customize title bar and window