简体   繁体   中英

Qt - custom window chrome

I want to create an app with QT v 5.3 (PyQT/PySide) that has a custom window chrome (somewhat resembling windows modern ui/metro) - here's the design.

Now my question is - should I go with standard QMainWindow, use the Qt.FramelessWindowHint and just add some widgets (for title bar, status bar, window action buttons) or should I create my own QWindow equivalent or maybe there's another option?

You can achieve the needed design with frameless window and custom controls. I did similar things in the past with Qt Widgets and it was really painful.

For your suggested UI, I would go with Qt Quick . It would be pretty easy and straight forward to do all of custom controls and with style standard (see Qt Quick Controls ) ones to your needs.

In addition you would need to implement custom handling for moving the window with mouse, as your window would lack the default header.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM