How to bulid Qt class with parameters ?
Moved
Unsolved
Qt Creator and other tools
-
Is there a recommanded way / procedure using QtCreator to build class with parameters ?
I can start with project option "add new " and end up with desired class...
Adding required parameters is OK, but prone to errors and time consuming.
include "a_bt_tab_dialog_ext.h" #include "ui_a_bt_tab_dialog_ext.h" // 2 add includes #include <QLabel> #include <QMdiArea> #include <QtSerialPort> // needs in in .,pro QT ?? A_BT_TAB_DIALOG_EXT::A_BT_TAB_DIALOG_EXT(QWidget *parent) : QWidget(parent), ui(new Ui::A_BT_TAB_DIALOG_EXT), // 1 add paramaters m_status(new QLabel), // m_console(new Console), // insert MDI area here ?? m_mdiarea(new QMdiArea), // m_settings(new SettingsDialog), //! [1] //! add rfcomm ?? m_serial(new QSerialPort(this) ) { ui->setupUi(this); }
-
-
You have to add them manually.
-
@Christian-Ehrlicher ...bummer... Now to figure out correct sequence...of adds...
Maybe start "at the end " of the class declaration by adding variables one at a time....