Custom title bar to qwidget

  • In PyQt5, I'm developing a custom baseclass inheriting QWidget, which adds a title bar providing(showing) the title(eg. app name) and close button. :)
    My goal is that I want to create widgets from this baseclass and place the widgets "with the title bar" on a splitted main window like a "canvas", which is going to be another QWidget.

    As you may know, setWindowTitle doesn't work as the title bar is invisible on the canvas.
    I'm trying some base classes such as QWidget and QFrame but no luck so far.

    I found one approach,, but the problem is the base class can't lay out appropriately because the detailed layout relies on its child's implementation. (I want to hide the title bar creation from children)

    Does anybody experience similar implementation?
    I would appreciate it if anybody could help me find a right direction.

    Many thanks in advance for your support.

  • Qt Champions 2017

    Just to be clear , you custom widgets are not used as windows?
    They are inside Mainwindow as regular widgets ?
    Just paint as a window?

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.