Hopefully a very quick question. In one of my functions I want to generate an 'x' number of tabs for a QTabWidget during run-time ('x' provided by user). I know I have to use the addTab function for the QTabWidget (correct me if I'm wrong), but I am unsure as to how I am supposed to use it. The qt documentation was unclear to me.
I have tried the following command to add only 1 tab as a test, but it caused the program to crash:
ui->checkBoxTabArea->addTab(ui->checkBoxTabArea,"tab2");
Since I am obviously wrong, can somebody help me use this function? I feel like I am just passing the wrong arguments to addTab.
Edit: checkBoxTabArea already has 1 tab when the program starts up (if this is any help).