I am in the process of learning Qt and generally C++, and I am stuck on this problem. Hopefully, it will be simple to answer.
I have a QTextEdit
created by this code:
void MainWindow::on_actionNewtab_triggered()
{
ui->tabWidget->addTab(new QTextEdit, "Untitled Document");
}
Now, if I make three tabs, I'm not sure how to edit the QTextBox
of the current tab that is selected. I looked in the documentation (which is pretty good) and I think I need this, but I'm not sure how. I also found this on this site, but that seems to edit all QTextEdits
?
The answer is probably extremely simple and I'm just missing something :). Please let me know if you need more details.