connect does not output to form
-
My task is to pass an object between objects, using "connect".
The "connect" works as expected, however, I cannot actually physically display the passed object -QString - on the appropriate form. I have verified that I am using correct UI.Here is the debug output
"!!!!!!!!!!!!!!!! emit SIGNAL...name SPP-CA" "SPP-CA" " TRACE UpateName name SPP-CAvoid BT_Config_MainWindow::UpateName(QString)@line 29" " TRACE UpateName name SPP-CAvoid BT_Config_MainWindow::UpateName(QString)@line 44" " TRACE UpateName name SPP-CAvoid BT_Config_MainWindow::UpateName(QString)@line 29" " TRACE UpateName name SPP-CAvoid BT_Config_MainWindow::UpateName(QString)@line 44"and here is the SLOT function code
codvoid BT_Config_MainWindow::UpateName(QString name ) { #ifdef TRACE text = " TRACE UpateName "; text += "name "; text += name; text += Q_FUNC_INFO; text += "@line "; text += QString::number(__LINE__); qDebug() << text; #endif // add to test label text = "add to test label "; ui->label->setText(name); ui->textEdit->append(name); ui->centralwidget->update(); #ifdef TRACE text = " TRACE UpateName "; text += "name "; text += name; text += Q_FUNC_INFO; text += "@line "; text += QString::number(__LINE__); qDebug() << text; #endif } void BT_Config_MainWindow::UpateAddress(QString address ) { #ifdef TRACE text = "TRACE UpateAddress "; text += "address "; text += address; text += Q_FUNC_INFO; text += "@line "; text += QString::number(__LINE__); qDebug() << text; #endif // add to test label text = "add to test label "; ui->label->setText(address); ui->label->setText(text); }e_textWhat am I missing ?
Any help would be appreciated .Cheers
-
My task is to pass an object between objects, using "connect".
The "connect" works as expected, however, I cannot actually physically display the passed object -QString - on the appropriate form. I have verified that I am using correct UI.Here is the debug output
"!!!!!!!!!!!!!!!! emit SIGNAL...name SPP-CA" "SPP-CA" " TRACE UpateName name SPP-CAvoid BT_Config_MainWindow::UpateName(QString)@line 29" " TRACE UpateName name SPP-CAvoid BT_Config_MainWindow::UpateName(QString)@line 44" " TRACE UpateName name SPP-CAvoid BT_Config_MainWindow::UpateName(QString)@line 29" " TRACE UpateName name SPP-CAvoid BT_Config_MainWindow::UpateName(QString)@line 44"and here is the SLOT function code
codvoid BT_Config_MainWindow::UpateName(QString name ) { #ifdef TRACE text = " TRACE UpateName "; text += "name "; text += name; text += Q_FUNC_INFO; text += "@line "; text += QString::number(__LINE__); qDebug() << text; #endif // add to test label text = "add to test label "; ui->label->setText(name); ui->textEdit->append(name); ui->centralwidget->update(); #ifdef TRACE text = " TRACE UpateName "; text += "name "; text += name; text += Q_FUNC_INFO; text += "@line "; text += QString::number(__LINE__); qDebug() << text; #endif } void BT_Config_MainWindow::UpateAddress(QString address ) { #ifdef TRACE text = "TRACE UpateAddress "; text += "address "; text += address; text += Q_FUNC_INFO; text += "@line "; text += QString::number(__LINE__); qDebug() << text; #endif // add to test label text = "add to test label "; ui->label->setText(address); ui->label->setText(text); }e_textWhat am I missing ?
Any help would be appreciated .Cheers
@AnneRanch seems like your string name has the content
SPP-CAso that works fine.You assign it to some UI elements that you confirmed or shown and visible.
Only remaining option would be that you somehow block/delay the Qt Event Loop. Updates to the UI are only visible when non of your custom code is executed.
So do you have endless or long lasting loops running, or do you call sleep somewhere in your code?
-
@AnneRanch seems like your string name has the content
SPP-CAso that works fine.You assign it to some UI elements that you confirmed or shown and visible.
Only remaining option would be that you somehow block/delay the Qt Event Loop. Updates to the UI are only visible when non of your custom code is executed.
So do you have endless or long lasting loops running, or do you call sleep somewhere in your code?
@J-Hilk "Fixed" ?? by OS update and reboot ... no comments