Unsolved Changing frame width in QMainWindow
-
Hi Gurus,
A quick question.
Is there any way to customize the frame width of QMainWindow?
I'm going to use setWindowFlags(Qt.CustomizeWindowHint) with almose frameless(0px or 1px) style for good looking purpose but with resizing functionality.
No luck so far, but may be in Stylesheet?Thanks in advance for your help.
Reagars,
Sat -
@ShinSat
With the proviso that I know nothing about this, does https://stackoverflow.com/questions/4899301/qmainwindow-set-framesize address your question? -
Hi
Nope you cant. Its controlled by the OS.
You can draw it yourself and re implement resizing but it often have issues.That said, its not an uncommon wish
https://github.com/dfct/TrueFramelessWindow -
Thank you very much for your help, all!
Looks like this is a wrong way to go and the only way to achieve that is to code everything(eg. resizing&moving) with "framelessWindowHint"(not customizeWindowHint) if I really want it.BTW, I'm curious about how guys deal with window (frame) shape issue as modern desktop applications, especially on Windows, do not use Window frame. That is, I think it's an old fashioned design in modern desktop applications.
Sat
-
We just leave it alone.
Its a OS settings and apps should not invent their own frames as it violates OS guide lines and
its very frustrating for a user if any app can work in different ways with regards to resize and close symbols.On linux, you can easy change how you want the decorations to look like (the frame) and hence its best left to the OS.