I created tab with:
ui->tabWidget->addTab(widgetTab,"Title");
I want to add a refresh button after tab text “Title”. How can I do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t believe you can directly. The
QTabBarelement ofQTabWidgetis only accessible via thetabBar()member function, which is protected. AndQTabBar‘ssetTabButtonisn’t exposed otherwise in the tab widget’s interface.You could do it by subclassing
QTabWidgetthough. Something like: