0

Say I have a tabwidget in my ui file this is how im adding tabs right now:

QPlainTextEdit *tab = new QPlaintextEdit;
int index = ui->tabWidget->addTab(tab, "changeme");

Now I'm wondering if it's possible to change the name of the tab on the go, for example when subclassing QPLainTextEdit in a class and connecting a signal to it when the text changes then i'd like to add a little star to the tab to indicate that the file has been modified, is it even possible?

1 Answers1

0

QTabWidet::setTabText does what you want.

E.g:

ui->tabWidget->setTabText(index, "new text");
Alan Birtles
  • 32,622
  • 4
  • 31
  • 60