QList with QtabWidget
Solved
General and Desktop
-
I am using Qlist to create QtabWidgets with several tabs but facing error message
when trying to add tabs, here is the code used to generate the QTabwidgets:mainwindow.h
QWidget *page1; QWidget *page2; QWidget *page3; QList <QTabWidget*> tab_widget_setup;
mainwindow.cpp
page1 = new QWidget; page2 = new QWidget; page3 = new QWidget; tab_widget_setup.append(new QTabWidget); tab_widget_setup[0]->addTab(page1); Error msg: no matching menber function for call to 'addTab'
Thks for your usual coop
-
@jipe3001 Check the documentation: https://doc.qt.io/qt-5/qtabwidget.html#addTab
You need to pass more than one parameter to addTab.