Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Custom title bar to qwidget
Forum Updated to NodeBB v4.3 + New Features

Custom title bar to qwidget

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 3.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    ShinSat
    wrote on last edited by ShinSat
    #1

    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, https://stackoverflow.com/questions/44241612/custom-titlebar-with-frame-in-pyqt5, 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.
    Regards,
    Sat

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved