Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. connect does not output to form
Forum Updated to NodeBB v4.3 + New Features

connect does not output to form

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 246 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anonymous_Banned275
    wrote on last edited by
    #1

    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_text
    

    What am I missing ?
    Any help would be appreciated .

    Cheers

    J.HilkJ 1 Reply Last reply
    0
    • A Anonymous_Banned275

      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_text
      

      What am I missing ?
      Any help would be appreciated .

      Cheers

      J.HilkJ Online
      J.HilkJ Online
      J.Hilk
      Moderators
      wrote on last edited by J.Hilk
      #2

      @AnneRanch seems like your string name has the content SPP-CA so 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?


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      A 1 Reply Last reply
      0
      • J.HilkJ J.Hilk

        @AnneRanch seems like your string name has the content SPP-CA so 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?

        A Offline
        A Offline
        Anonymous_Banned275
        wrote on last edited by
        #3

        @J-Hilk "Fixed" ?? by OS update and reboot ... no comments

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved