I want to create a personalized UI with my Qt application. For this reason I want to edit the default window frame that you can see at any type of window application.
The application that contains the default window title and frame:
http://0000.2.img98.net/out.php/i12977_with-default-title-and-frame.jpg
The application that edit the window title and frame:
http://0000.2.img98.net/out.php/i12978_without-defualt-title-andframe.jpg
You need to create a new class derived from
QWidget, and passQt::FramelessWindowHintargument toQWidgetconstructor, like this:After it you need to reimplement
QWidget::paintEvent (QPaintEvent * event)and draw any design you want.For example, you have main window design as a PNG image.
Since we don’t see a titlebar, we need to implement window drag operation: