Click here to Skip to main content
15,886,873 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: another "include" question... Pin
Richard MacCutchan28-Nov-23 5:16
mveRichard MacCutchan28-Nov-23 5:16 
GeneralRe: another "include" question... Pin
k505428-Nov-23 6:11
mvek505428-Nov-23 6:11 
AnswerRe: another "include" question... Pin
Salvatore Terress28-Nov-23 7:38
Salvatore Terress28-Nov-23 7:38 
GeneralRe: another "include" question... Pin
Richard MacCutchan28-Nov-23 21:57
mveRichard MacCutchan28-Nov-23 21:57 
GeneralRe: another "include" question... Pin
Salvatore Terress1-Dec-23 6:42
Salvatore Terress1-Dec-23 6:42 
GeneralRe: another "include" question... Pin
Richard MacCutchan1-Dec-23 6:55
mveRichard MacCutchan1-Dec-23 6:55 
AnswerRe: another "include" question... Pin
Maximilien29-Nov-23 2:33
Maximilien29-Nov-23 2:33 
Questionerror: member access into incomplete type Pin
Salvatore Terress27-Nov-23 6:07
Salvatore Terress27-Nov-23 6:07 
could somebody PLEASE explain to me and help me to understand the error.

I can build and show the dialog object

// build basic dialoog
MainWindow_Bluewtoothctl_Dialog *MWBD = new MainWindow_Bluewtoothctl_Dialog();
MWBD->show();

however I cannot access its "ui" and getting the "incomplete error ".

I build a local function and then have access to "ui".




QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow_Bluewtoothctl_Dialog; }
QT_END_NAMESPACE

class MainWindow_Bluewtoothctl_Dialog : public QDialog
{
Q_OBJECT

public:
MainWindow_Bluewtoothctl_Dialog(QWidget *parent = nullptr);
~MainWindow_Bluewtoothctl_Dialog();
// adds

BT_Utility_Library *BTUL;

QString text;
QString EditText(QString );
QString EditText(QString, QWidget*);
QString EditText(QString, QWidget*, QWidget*);
QString Command(QString );
private:
public:
Ui::MainWindow_Bluewtoothctl_Dialog *ui;
};
C++
<pre lang="C++">MainWindow_Bluewtoothctl_Dialog::MainWindow_Bluewtoothctl_Dialog(QWidget *parent)
    : QDialog(parent)
    , ui(new Ui::MainWindow_Bluewtoothctl_Dialog)
{
    ui->setupUi(this);
#ifdef TRACE
    text = " TASK MainWindow_Bluewtoothctl_Dialog ";
    text += " ";
    text += Q_FUNC_INFO;
    text += "  @ line  ";
    text += QString::number(__LINE__);
    //text += "  TASK    index ";
    //text += QString::number(index);
    qDebug() << text;
    ui->textEdit->append(text);
#endif
    text = " Constructor...";
    ui->textEdit->append(" Constructor..."); // OK here 
}

MainWindow_Bluewtoothctl_Dialog::~MainWindow_Bluewtoothctl_Dialog()
{
    delete ui;
}


// build basic dialoog
MainWindow_Bluewtoothctl_Dialog *MWBD = new MainWindow_Bluewtoothctl_Dialog();
MWBD->show();

// add function to bypass "INCOMPLETE WHATEVER
text = " add function to bypass INCOMPLETE WHATEVER ";
MWBD->EditText(text);


// TEST ui
MWBD->ui->textEdit->append(text);

this fails with "incomplete error " why ?




Here is full error:

mainwindow.cpp:595:17: error: member access into incomplete type 'Ui::MainWindow_Bluewtoothctl_Dialog'
        MWBD->ui->textEdit->append(text);
                ^
/mnt/07b7c3f8-0efb-45ab-8df8-2a468771de1f/BT_NOV26_BACKUP/BT_NOV26/FT857_CAT_Bluetooth/BluetoothctldIALOG_Object/Bluetoothctl_Dialog/mainwindow_bluewtoothctl_dialog.h:16:22: note: forward declaration of 'Ui::MainWindow_Bluewtoothctl_Dialog'
namespace Ui { class MainWindow_Bluewtoothctl_Dialog; }
                     ^


Thanks for your help.
AnswerRe: error: member access into incomplete type Pin
Richard Andrew x6427-Nov-23 10:17
professionalRichard Andrew x6427-Nov-23 10:17 
GeneralSOLVED Re: error: member access into incomplete type Pin
Salvatore Terress27-Nov-23 10:44
Salvatore Terress27-Nov-23 10:44 
GeneralRe: SOLVED Re: error: member access into incomplete type Pin
Richard Andrew x6427-Nov-23 12:06
professionalRichard Andrew x6427-Nov-23 12:06 
AnswerRe: error: member access into incomplete type Pin
JudyL_MD27-Nov-23 10:21
JudyL_MD27-Nov-23 10:21 
QuestionApplication not Launching when converting from 32bit to 64bit in VS Pin
Member 1614225419-Nov-23 15:31
Member 1614225419-Nov-23 15:31 
AnswerRe: Application not Launching when converting from 32bit to 64bit in VS Pin
Richard MacCutchan19-Nov-23 21:41
mveRichard MacCutchan19-Nov-23 21:41 
AnswerRe: Application not Launching when converting from 32bit to 64bit in VS Pin
jschell20-Nov-23 7:23
jschell20-Nov-23 7:23 
QuestionC++ file handling Pin
Saboor Sarfraz18-Nov-23 7:11
Saboor Sarfraz18-Nov-23 7:11 
AnswerRe: C++ file handling Pin
Greg Utas18-Nov-23 8:42
professionalGreg Utas18-Nov-23 8:42 
AnswerRe: C++ file handling Pin
k505418-Nov-23 8:59
mvek505418-Nov-23 8:59 
AnswerRe: C++ file handling Pin
jschell20-Nov-23 7:30
jschell20-Nov-23 7:30 
Question&foo[bar] or (foo + bar) ? Pin
honey the codewitch16-Nov-23 11:48
mvahoney the codewitch16-Nov-23 11:48 
AnswerRe: &foo[bar] or (foo + bar) ? Pin
k505416-Nov-23 16:14
mvek505416-Nov-23 16:14 
GeneralRe: &foo[bar] or (foo + bar) ? Pin
JudyL_MD17-Nov-23 3:15
JudyL_MD17-Nov-23 3:15 
AnswerRe: &foo[bar] or (foo + bar) ? Pin
CPallini16-Nov-23 20:08
mveCPallini16-Nov-23 20:08 
GeneralRe: &foo[bar] or (foo + bar) ? Pin
Peter_in_278017-Nov-23 18:28
professionalPeter_in_278017-Nov-23 18:28 
GeneralRe: &foo[bar] or (foo + bar) ? Pin
Richard MacCutchan17-Nov-23 22:11
mveRichard MacCutchan17-Nov-23 22:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.