简体   繁体   中英

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

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:

图片说明

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

图片说明

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

图片说明

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

  • ... delete tabs?
  • ... add tabs?
  • ... rename tabs?
  • ... change tab layout?

Just to make it more clear...

Add tab to QTabWidget:

From QTabWidget context menu → InsertPage:

将标签添加到 QTabWidget 屏幕截图

Rename tab in QTabWidget

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

重命名 QTabWidget 屏幕截图中的选项卡

Delete tab in QTabWidget

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

在 QTabWidget 屏幕截图中删除选项卡

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'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM