include header OK, include ui fails
-
SOLVED
QWidget *TAB_DIALOG = new A_BT_TAB_DIALOG();
SHOULD BE
A_BT_TAB_DIALOG *TAB_DIALOG = new A_BT_TAB_DIALOG();
Another include hell...Can somebody seriously explain why ? (see title)
I can modify ui in class constructor
ui exists !
but I cannot in other code .
intelisense does not see "ui "QWidget *TAB_DIALOG = new A_BT_TAB_DIALOG();
m_mdiarea->addSubWindow( TAB_DIALOG);
TAB_DIALOG->setWindowTitle(" Common hcitool TAB "); // TOK
TAB_DIALOG->ui->setToolTip(" Another tool tip...");and here is the error
/mnt/A_BT_DEC10/BT__PROGRAMS/A_DEC31_V1/A_BT_LIBRARY/terminal_Bluetooth/mainwindow_Bluetooth.cpp:183: error: no member named 'ui' in 'QWidget'
mainwindow_Bluetooth.cpp:183:17: error: no member named 'ui' in 'QWidget'
TAB_DIALOG->ui->setToolTip(" Another tool tip...");
~~~~~~~~~~ ^I am asking for best guess explanation of THIS error.
Here are the includes , compiler /linker has no issue
#include "../../../A_BT_LIBRARY/CCC_SOURCE/A_BT_TAB_DIALOG/a_bt_tab_dialog.h" #include "../../../A_BT_LIBRARY/CCC_SOURCE/A_BT_TAB_DIALOG/ui_a_bt_tab_dialog.h" -
SOLVED
QWidget *TAB_DIALOG = new A_BT_TAB_DIALOG();
SHOULD BE
A_BT_TAB_DIALOG *TAB_DIALOG = new A_BT_TAB_DIALOG();
Another include hell...Can somebody seriously explain why ? (see title)
I can modify ui in class constructor
ui exists !
but I cannot in other code .
intelisense does not see "ui "QWidget *TAB_DIALOG = new A_BT_TAB_DIALOG();
m_mdiarea->addSubWindow( TAB_DIALOG);
TAB_DIALOG->setWindowTitle(" Common hcitool TAB "); // TOK
TAB_DIALOG->ui->setToolTip(" Another tool tip...");and here is the error
/mnt/A_BT_DEC10/BT__PROGRAMS/A_DEC31_V1/A_BT_LIBRARY/terminal_Bluetooth/mainwindow_Bluetooth.cpp:183: error: no member named 'ui' in 'QWidget'
mainwindow_Bluetooth.cpp:183:17: error: no member named 'ui' in 'QWidget'
TAB_DIALOG->ui->setToolTip(" Another tool tip...");
~~~~~~~~~~ ^I am asking for best guess explanation of THIS error.
Here are the includes , compiler /linker has no issue
#include "../../../A_BT_LIBRARY/CCC_SOURCE/A_BT_TAB_DIALOG/a_bt_tab_dialog.h" #include "../../../A_BT_LIBRARY/CCC_SOURCE/A_BT_TAB_DIALOG/ui_a_bt_tab_dialog.h"As you can see in the QWidget documentation, QWidget has not member 'ui'. Maybe A_BT_TAB_DIALOG has but the pointer is of type QWidget.
-
SOLVED
QWidget *TAB_DIALOG = new A_BT_TAB_DIALOG();
SHOULD BE
A_BT_TAB_DIALOG *TAB_DIALOG = new A_BT_TAB_DIALOG();
Another include hell...Can somebody seriously explain why ? (see title)
I can modify ui in class constructor
ui exists !
but I cannot in other code .
intelisense does not see "ui "QWidget *TAB_DIALOG = new A_BT_TAB_DIALOG();
m_mdiarea->addSubWindow( TAB_DIALOG);
TAB_DIALOG->setWindowTitle(" Common hcitool TAB "); // TOK
TAB_DIALOG->ui->setToolTip(" Another tool tip...");and here is the error
/mnt/A_BT_DEC10/BT__PROGRAMS/A_DEC31_V1/A_BT_LIBRARY/terminal_Bluetooth/mainwindow_Bluetooth.cpp:183: error: no member named 'ui' in 'QWidget'
mainwindow_Bluetooth.cpp:183:17: error: no member named 'ui' in 'QWidget'
TAB_DIALOG->ui->setToolTip(" Another tool tip...");
~~~~~~~~~~ ^I am asking for best guess explanation of THIS error.
Here are the includes , compiler /linker has no issue
#include "../../../A_BT_LIBRARY/CCC_SOURCE/A_BT_TAB_DIALOG/a_bt_tab_dialog.h" #include "../../../A_BT_LIBRARY/CCC_SOURCE/A_BT_TAB_DIALOG/ui_a_bt_tab_dialog.h"@AnneRanch said in include header OK, include ui fails:
intelisense does not see "ui "
Not every
QWidget/QObjectclass you've created, has a user interface.
uiis just the reference to objects in the compiled*.uidesigner file.By the way, since you asked for consistancy lately: You should make your code (variable names, struture etc.) also more consistent.
Your code gets more and more confusing, even these tiny snippets already.A_BT_TAB_DIALOGis a filename and a class name whereasTAB_DIALOGis a pointer variable... later no one will be able to keep track of things, because everything is named differently from time to time.