asked in C plus plus (C++) by (8.9k points)
0 like 0 dislike
513 views

How to I can in designer (Qt Designer) set label text in certain tab of Qt tab widget (QTabWidget)? I.e. how to in designer set tab title in QTabWidget?

qt designer tab title

1 Answer

0 like 0 dislike
answered by (8.9k points)

Make active tab you want to rename, but in "Qt Object browser" should be select exactly all QTabWidget (not specific tab), then in the Property Editor (if you can't find it make sure it's visible by using the View->Property Editor menu item) scroll down to the bottom and look for the currentTabText property. You can change the tab's name right there.

In Qt Creator Designer, if you can't seem to find the currentTabText property, you have probably selected the tab itself in the the object tree. Make sure to select the QTabWidget, which should happen automatically when selecting the tab in the form preview.

Also you can use this at runtime:

ui->tabWidget->setTabText(index, "New tab title");

Your answer

Try to answer the question as detailed as possible.
Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

Related questions

0 like 0 dislike
1 answer 26 views
0 like 0 dislike
1 answer 3 views
0 like 0 dislike
1 answer 78 views
0 like 0 dislike
1 answer 44 views
0 like 0 dislike
1 answer 51 views
0 like 0 dislike
1 answer 20 views
0 like 0 dislike
1 answer 32 views
0 like 0 dislike
1 answer 28 views
0 like 0 dislike
1 answer 50 views
...