I have a QTabWidget called tabWidget. It has three tabs: \"Basic\", \"Advanced\", and \"Current Structure\". The tabs are displayed in the widget in that order
QTabWidget
You can enable/disable individual tabs in a QTabWidget using the member function setTabEnabled(int index, bool enable).
Based on your code snippet, it would look like this:
bool result = false; if (result == false) { tabWidget->setTabEnabled(1, false); }