QTabWidget: How to get header widget, which contain tab bar and corner widget?
-
As the image I provided, I want to get the widget containing the Tab bar and Corner widget as I have zoned it. Anyone have any ideas? Help me please!

-
As the image I provided, I want to get the widget containing the Tab bar and Corner widget as I have zoned it. Anyone have any ideas? Help me please!

@Hai-Anh-Luu said in QTabWidget: How to get header widget, which contain tab bar and corner widget?:
I want to get the widget containing the Tab bar and Corner widget as I have zoned it. Anyone have any ideas? Help me please!
These are two separate things.
You can get/set theQTabBarwidget with:and the corner widget with:
-
@Hai-Anh-Luu said in QTabWidget: How to get header widget, which contain tab bar and corner widget?:
I want to get the widget containing the Tab bar and Corner widget as I have zoned it. Anyone have any ideas? Help me please!
These are two separate things.
You can get/set theQTabBarwidget with:and the corner widget with:
@Pl45m4 Thank for your answer. But I want to get the free space between QTabBar and Corner widget. Do you have any way to do that? I want to do this because I'm programming an application:
- I setWindowFlags(QtCore.Qt.FramelessWindowHint) and customized a new title bar with Maximum, Minimize and Close buttons.
- Along with that, I want the widget to contain a QTabBar and Corner widget that can move the window when I drag it. My English is not very good so I will attach an image that I want my QTabWidget to be able to build like that.
I want my TabWidget like this:

-
@Pl45m4 Thank for your answer. But I want to get the free space between QTabBar and Corner widget. Do you have any way to do that? I want to do this because I'm programming an application:
- I setWindowFlags(QtCore.Qt.FramelessWindowHint) and customized a new title bar with Maximum, Minimize and Close buttons.
- Along with that, I want the widget to contain a QTabBar and Corner widget that can move the window when I drag it. My English is not very good so I will attach an image that I want my QTabWidget to be able to build like that.
I want my TabWidget like this:

@Hai-Anh-Luu said in QTabWidget: How to get header widget, which contain tab bar and corner widget?:
But I want to get the free space between QTabBar and Corner widget
There is no widget there.
It either belongs toQTabBar(you can have many tabs there) or it's the background ofQTabWidget -
@Hai-Anh-Luu said in QTabWidget: How to get header widget, which contain tab bar and corner widget?:
But I want to get the free space between QTabBar and Corner widget
There is no widget there.
It either belongs toQTabBar(you can have many tabs there) or it's the background ofQTabWidget@Pl45m4 said in QTabWidget: How to get header widget, which contain tab bar and corner widget?:
It either belongs to QTabBar (you can have many tabs there) or it's the background of QTabWidget
Implementation hint: override
mouseMoveEventto handle dragging the widget (first checking if you are between the tabs and the corner widgets and checking if the left button is pressed).