How to access QTabWidget tab editor in Qt Designer - when I double click object name dialog pops up
Asked Answered
G

2

7

I have a QTabWidget and I want to add/remove/rename individual tabs. Some sources claim that you can double click it to get a tab editor. When I double click it, I get the "Object name" popup:

image description

I need a similar editor like the one used for comboboxes:

image description

I also tried to edit tab properties by right-clicking it in object tree. The menu is pretty stripped of any useful options:

image description

How to manage tabs? Is it possible without XML editor? If yes how do I

  • ... delete tabs?
  • ... add tabs?
  • ... rename tabs?
  • ... change tab layout?
Get answered 4/4, 2016 at 10:30 Comment(0)
G
21

Just to make it more clear...

Add tab to QTabWidget:

From QTabWidget context menu → InsertPage:

Add tab to QTabWidget screenshot

Rename tab in QTabWidget

Select the tab to rename by clicking on it. Then edit QTabWidget property currentTabText in the property editor:

Rename tab in QTabWidget screenshot

Delete tab in QTabWidget

Select the tab you want to delete. From QTabWidget context menu → Page X of Y → delete:

Delete tab in QTabWidget screenshot

Get answered 4/4, 2016 at 11:13 Comment(0)
N
2

You should just work with each tab as with a normal widget on screen, without double click. To switch between tabs just click on them, for stacked widget there are two small arrows in the top right corner to switch between pages.

To delete tabs right-click then use 'Insert page', or choose page sub-menu where you can delete or rename page.

You can just drag tabs using header to change the order.

Above 'Insert page' there is a menu item 'Page N of M' (which is currently selected page), in there you will find an item - 'Remove page'

Nagaland answered 4/4, 2016 at 10:43 Comment(1)
Can you expand on how does Insert page help me to delete page?Readily

© 2022 - 2024 — McMap. All rights reserved.