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. how to echo directly from dynamic input
Forum Update on Monday, May 27th 2025

how to echo directly from dynamic input

Scheduled Pinned Locked Moved Solved General and Desktop
22 Posts 4 Posters 3.1k Views
  • 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.
  • M Offline
    M Offline
    Mijaz
    wrote on 24 Oct 2019, 04:57 last edited by Mijaz
    #1

    This code worked fine:

    system("cd /sys/bus/iio/devices/iio:device1/; echo 1111 > out_altvoltage1_TX_LO_frequency");
    QProcess process1;
    process1.start("cat /sys/bus/iio/devices/iio:device1/out_altvoltage1_TX_LO_frequency");
    process1.waitForFinished(-1); // will wait forever until finished
    QString stdout1 = process1.readAllStandardOutput();
    qDebug() << stdout1;
    ui->lineEdit_3->setText(stdout1);
    

    // output display in lineEdit_3 : 1111 (this is correct)

    This code not working correctly:
    QString input = ui->lineEdit_1->text();
    // entered value 2222 to the lineEdit_1 in GUI
    ui->lineEdit_2->setText(input);
    // diplay lineEdit_2 : 2222 (this is correct)
    // I want to directly echo the input as given below but this not updating the (out_altvoltage1_TX_LO_frequency) register value.

    system("cd /sys/bus/iio/devices/iio:device1/; echo input > out_altvoltage1_TX_LO_frequency");   
    QProcess process1;
    process1.start("cat /sys/bus/iio/devices/iio:device1/out_altvoltage1_TX_LO_frequency");
    process1.waitForFinished(-1); // will wait forever until finished
    QString stdout1 = process1.readAllStandardOutput();
    qDebug() << stdout1;
    ui->lineEdit_3->setText(stdout1);
    

    // output display in lineEdit_3 : 1111 (this is not correct)

    J 1 Reply Last reply 24 Oct 2019, 05:14
    0
    • M Mijaz
      24 Oct 2019, 06:13

      @jsulm
      No input is not a directory it is the string in which I have stored value in about command like this:

      QString input = ui->lineEdit_1->text();
      ui->lineEdit_2->setText(input);
      Now I want to use this "input" in which I already stored value to update my out_altvoltage1_TX_LO_frequency.
      //
      Detail explenation of my work:
      Step 1:
      I firstly executed following commands on my board where I am deploying my project like this:

      cd /sys/bus/iio/devices/iio:device1/
      echo 111111 > out_altvoltage1_TX_LO_frequency
      This worked fine;
      Step 2:
      I create project on my PC using following commands and GUI.

      system("cd /sys/bus/iio/devices/iio:device1/; echo 222222 > out_altvoltage1_TX_LO_frequency");
      QProcess process1;
      process1.start("cat /sys/bus/iio/devices/iio:device1/out_altvoltage1_TX_LO_frequency");
      process1.waitForFinished(-1); // will wait forever until finished
      QString stdout1 = process1.readAllStandardOutput();
      qDebug() << stdout1;
      ui->lineEdit_3->setText(stdout1);
      This also work correctly.
      Step 3:
      Now, because it is my task requirement that I need update register (out_altvoltage1_TX_LO_frequency) value at real-time, depends on the situation not remained fixed like (222222), therefore I update code like this:

      QString input = ui->lineEdit_1->text();
      ui->lineEdit_2->setText(input);
      QFile f("/sys/bus/iio/devices/iio:device1/input");
      if (f.open(QIODevice::ReadOnly | QIODevice::Text))
      {
      QByteArray ba = f.readAll();
      ui->lineEdit_3->setText(QString(ba));
      f.close();
      }

      whenever I will enter a new value to lineEdit_1 that should update register (out_altvoltage1_TX_LO_frequency) immediately,

      this code not working as my requirements.

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 24 Oct 2019, 06:19 last edited by
      #13

      @Mijaz OK, that means you want to write to /sys/bus/iio/devices/iio:device1/out_altvoltage1_TX_LO_frequency file, because

      cd /sys/bus/iio/devices/iio:device1/
      echo 111111 > out_altvoltage1_TX_LO_frequency
      

      does exactly that.
      Then simply use QFile to write:

      QFile f("/sys/bus/iio/devices/iio:device1/out_altvoltage1_TX_LO_frequency");
      if (f.open(QIODevice::WriteOnly | QIODevice::Text)) {
          f.write(ui->lineEdit_2->text().toLatin1());
          f.close();
      }
      

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      M 2 Replies Last reply 24 Oct 2019, 06:42
      1
      • M Mijaz
        24 Oct 2019, 04:57

        This code worked fine:

        system("cd /sys/bus/iio/devices/iio:device1/; echo 1111 > out_altvoltage1_TX_LO_frequency");
        QProcess process1;
        process1.start("cat /sys/bus/iio/devices/iio:device1/out_altvoltage1_TX_LO_frequency");
        process1.waitForFinished(-1); // will wait forever until finished
        QString stdout1 = process1.readAllStandardOutput();
        qDebug() << stdout1;
        ui->lineEdit_3->setText(stdout1);
        

        // output display in lineEdit_3 : 1111 (this is correct)

        This code not working correctly:
        QString input = ui->lineEdit_1->text();
        // entered value 2222 to the lineEdit_1 in GUI
        ui->lineEdit_2->setText(input);
        // diplay lineEdit_2 : 2222 (this is correct)
        // I want to directly echo the input as given below but this not updating the (out_altvoltage1_TX_LO_frequency) register value.

        system("cd /sys/bus/iio/devices/iio:device1/; echo input > out_altvoltage1_TX_LO_frequency");   
        QProcess process1;
        process1.start("cat /sys/bus/iio/devices/iio:device1/out_altvoltage1_TX_LO_frequency");
        process1.waitForFinished(-1); // will wait forever until finished
        QString stdout1 = process1.readAllStandardOutput();
        qDebug() << stdout1;
        ui->lineEdit_3->setText(stdout1);
        

        // output display in lineEdit_3 : 1111 (this is not correct)

        J Offline
        J Offline
        jsulm
        Lifetime Qt Champion
        wrote on 24 Oct 2019, 05:14 last edited by
        #2

        @Mijaz This looks really overcomplicated: why don't you simply use QFile to read from /sys/bus... instead of spawning a process for such a simple task? There is really no need to use cat in a process to read a file...

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        M 1 Reply Last reply 24 Oct 2019, 05:18
        2
        • J jsulm
          24 Oct 2019, 05:14

          @Mijaz This looks really overcomplicated: why don't you simply use QFile to read from /sys/bus... instead of spawning a process for such a simple task? There is really no need to use cat in a process to read a file...

          M Offline
          M Offline
          Mijaz
          wrote on 24 Oct 2019, 05:18 last edited by
          #3

          Hi @jsulm yes, you are correct I can read from QFile also. But here main problem is
          echo input > out_altvoltage1_TX_LO_frequency;
          How can do this in qt;

          J 1 Reply Last reply 24 Oct 2019, 05:20
          0
          • M Mijaz
            24 Oct 2019, 05:18

            Hi @jsulm yes, you are correct I can read from QFile also. But here main problem is
            echo input > out_altvoltage1_TX_LO_frequency;
            How can do this in qt;

            J Offline
            J Offline
            jsulm
            Lifetime Qt Champion
            wrote on 24 Oct 2019, 05:20 last edited by
            #4

            @Mijaz said in how to echo directly from dynamic input:

            How can do this in qt;

            This writes into a file, you can do it also with QFile.

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            M 1 Reply Last reply 24 Oct 2019, 05:28
            1
            • J jsulm
              24 Oct 2019, 05:20

              @Mijaz said in how to echo directly from dynamic input:

              How can do this in qt;

              This writes into a file, you can do it also with QFile.

              M Offline
              M Offline
              Mijaz
              wrote on 24 Oct 2019, 05:28 last edited by Mijaz
              #5

              @jsulm
              Do you mean like this?

              QFile f("echo /sys/bus/iio/devices/iio:device1/input > out_altvoltage1_TX_LO_frequency");
              if (f.open(QIODevice::ReadOnly | QIODevice::Text))
              {
              QByteArray ba = f.readAll();
              ui->lineEdit_3->setText(QString(ba));
              f.close();
              }
              Selection_022.png

              J 2 Replies Last reply 24 Oct 2019, 05:38
              0
              • M Mijaz
                24 Oct 2019, 05:28

                @jsulm
                Do you mean like this?

                QFile f("echo /sys/bus/iio/devices/iio:device1/input > out_altvoltage1_TX_LO_frequency");
                if (f.open(QIODevice::ReadOnly | QIODevice::Text))
                {
                QByteArray ba = f.readAll();
                ui->lineEdit_3->setText(QString(ba));
                f.close();
                }
                Selection_022.png

                J Offline
                J Offline
                jsulm
                Lifetime Qt Champion
                wrote on 24 Oct 2019, 05:38 last edited by
                #6

                @Mijaz said in how to echo directly from dynamic input:

                you mean like this?

                No, I don't.
                Just open the file using QFile and read/write from/to it:

                QFile f("/sys/bus/iio/devices/iio:device1/input");
                if (f.open(QIODevice::ReadOnly | QIODevice::Text)) {
                    QByteArray ba = f.readAll();
                    ui->lineEdit_3->setText(QString(ba));
                    f.close();
                }
                

                Be careful with QIODevice::Text: don't use it if file contains binary data.

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                M 1 Reply Last reply 24 Oct 2019, 05:44
                0
                • M Mijaz
                  24 Oct 2019, 05:28

                  @jsulm
                  Do you mean like this?

                  QFile f("echo /sys/bus/iio/devices/iio:device1/input > out_altvoltage1_TX_LO_frequency");
                  if (f.open(QIODevice::ReadOnly | QIODevice::Text))
                  {
                  QByteArray ba = f.readAll();
                  ui->lineEdit_3->setText(QString(ba));
                  f.close();
                  }
                  Selection_022.png

                  J Offline
                  J Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on 24 Oct 2019, 05:39 last edited by jsulm
                  #7

                  @Mijaz The line where you get that error does not make any sense.
                  I don't know what you are trying to do there...

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  M 1 Reply Last reply 24 Oct 2019, 05:54
                  1
                  • J jsulm
                    24 Oct 2019, 05:38

                    @Mijaz said in how to echo directly from dynamic input:

                    you mean like this?

                    No, I don't.
                    Just open the file using QFile and read/write from/to it:

                    QFile f("/sys/bus/iio/devices/iio:device1/input");
                    if (f.open(QIODevice::ReadOnly | QIODevice::Text)) {
                        QByteArray ba = f.readAll();
                        ui->lineEdit_3->setText(QString(ba));
                        f.close();
                    }
                    

                    Be careful with QIODevice::Text: don't use it if file contains binary data.

                    M Offline
                    M Offline
                    Mijaz
                    wrote on 24 Oct 2019, 05:44 last edited by
                    #8

                    @jsulm
                    QFile f("/sys/bus/iio/devices/iio:device1/input");
                    if (f.open(QIODevice::ReadOnly | QIODevice::Text)) {
                    QByteArray ba = f.readAll();
                    ui->lineEdit_3->setText(QString(ba));
                    f.close();
                    }

                    I executed above your code, no any output display.

                    J 1 Reply Last reply 24 Oct 2019, 05:46
                    0
                    • M Mijaz
                      24 Oct 2019, 05:44

                      @jsulm
                      QFile f("/sys/bus/iio/devices/iio:device1/input");
                      if (f.open(QIODevice::ReadOnly | QIODevice::Text)) {
                      QByteArray ba = f.readAll();
                      ui->lineEdit_3->setText(QString(ba));
                      f.close();
                      }

                      I executed above your code, no any output display.

                      J Offline
                      J Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on 24 Oct 2019, 05:46 last edited by
                      #9

                      @Mijaz said in how to echo directly from dynamic input:

                      /sys/bus/iio/devices/iio:device1/input

                      Is this a valid path?
                      Did you check return value of open()?
                      Did you check what https://doc.qt.io/qt-5/qiodevice.html#errorString returns?
                      Does /sys/bus/iio/devices/iio:device1/input contain text or binary data?

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      1
                      • J jsulm
                        24 Oct 2019, 05:39

                        @Mijaz The line where you get that error does not make any sense.
                        I don't know what you are trying to do there...

                        M Offline
                        M Offline
                        Mijaz
                        wrote on 24 Oct 2019, 05:54 last edited by
                        #10

                        @jsulm
                        I want to update register (out_altvoltage1_TX_LO_frequency) with the new value;
                        In real time when I will enter new value to lineEdit_1 then it should be display in lineEdit_2 as well as update the register (out_altvoltage1_TX_LO_frequency) which will recheck in lineEdit_3.

                        QString input = ui->lineEdit_1->text();
                        ui->lineEdit_2->setText(input);
                        QFile f("/sys/bus/iio/devices/iio:device1/input");
                        if (f.open(QIODevice::ReadOnly | QIODevice::Text))
                        {
                        QByteArray ba = f.readAll();
                        ui->lineEdit_3->setText(QString(ba));
                        f.close();
                        }

                        J 1 Reply Last reply 24 Oct 2019, 05:58
                        0
                        • M Mijaz
                          24 Oct 2019, 05:54

                          @jsulm
                          I want to update register (out_altvoltage1_TX_LO_frequency) with the new value;
                          In real time when I will enter new value to lineEdit_1 then it should be display in lineEdit_2 as well as update the register (out_altvoltage1_TX_LO_frequency) which will recheck in lineEdit_3.

                          QString input = ui->lineEdit_1->text();
                          ui->lineEdit_2->setText(input);
                          QFile f("/sys/bus/iio/devices/iio:device1/input");
                          if (f.open(QIODevice::ReadOnly | QIODevice::Text))
                          {
                          QByteArray ba = f.readAll();
                          ui->lineEdit_3->setText(QString(ba));
                          f.close();
                          }

                          J Offline
                          J Offline
                          jsulm
                          Lifetime Qt Champion
                          wrote on 24 Oct 2019, 05:58 last edited by
                          #11

                          @Mijaz You did not answer my questions from my previous post.
                          Do you mean you want to update out_altvoltage1_TX_LO_frequency inside /sys/bus/iio/devices/iio:device1/input ?
                          Because this:

                          echo /sys/bus/iio/devices/iio:device1/input > out_altvoltage1_TX_LO_frequency
                          

                          would write the content of /sys/bus/iio/devices/iio:device1/input into file out_altvoltage1_TX_LO_frequency in current working directory.

                          https://forum.qt.io/topic/113070/qt-code-of-conduct

                          M 1 Reply Last reply 24 Oct 2019, 06:13
                          0
                          • J jsulm
                            24 Oct 2019, 05:58

                            @Mijaz You did not answer my questions from my previous post.
                            Do you mean you want to update out_altvoltage1_TX_LO_frequency inside /sys/bus/iio/devices/iio:device1/input ?
                            Because this:

                            echo /sys/bus/iio/devices/iio:device1/input > out_altvoltage1_TX_LO_frequency
                            

                            would write the content of /sys/bus/iio/devices/iio:device1/input into file out_altvoltage1_TX_LO_frequency in current working directory.

                            M Offline
                            M Offline
                            Mijaz
                            wrote on 24 Oct 2019, 06:13 last edited by
                            #12

                            @jsulm
                            No input is not a directory it is the string in which I have stored value in about command like this:

                            QString input = ui->lineEdit_1->text();
                            ui->lineEdit_2->setText(input);
                            Now I want to use this "input" in which I already stored value to update my out_altvoltage1_TX_LO_frequency.
                            //
                            Detail explenation of my work:
                            Step 1:
                            I firstly executed following commands on my board where I am deploying my project like this:

                            cd /sys/bus/iio/devices/iio:device1/
                            echo 111111 > out_altvoltage1_TX_LO_frequency
                            This worked fine;
                            Step 2:
                            I create project on my PC using following commands and GUI.

                            system("cd /sys/bus/iio/devices/iio:device1/; echo 222222 > out_altvoltage1_TX_LO_frequency");
                            QProcess process1;
                            process1.start("cat /sys/bus/iio/devices/iio:device1/out_altvoltage1_TX_LO_frequency");
                            process1.waitForFinished(-1); // will wait forever until finished
                            QString stdout1 = process1.readAllStandardOutput();
                            qDebug() << stdout1;
                            ui->lineEdit_3->setText(stdout1);
                            This also work correctly.
                            Step 3:
                            Now, because it is my task requirement that I need update register (out_altvoltage1_TX_LO_frequency) value at real-time, depends on the situation not remained fixed like (222222), therefore I update code like this:

                            QString input = ui->lineEdit_1->text();
                            ui->lineEdit_2->setText(input);
                            QFile f("/sys/bus/iio/devices/iio:device1/input");
                            if (f.open(QIODevice::ReadOnly | QIODevice::Text))
                            {
                            QByteArray ba = f.readAll();
                            ui->lineEdit_3->setText(QString(ba));
                            f.close();
                            }

                            whenever I will enter a new value to lineEdit_1 that should update register (out_altvoltage1_TX_LO_frequency) immediately,

                            this code not working as my requirements.

                            J 1 Reply Last reply 24 Oct 2019, 06:19
                            0
                            • M Mijaz
                              24 Oct 2019, 06:13

                              @jsulm
                              No input is not a directory it is the string in which I have stored value in about command like this:

                              QString input = ui->lineEdit_1->text();
                              ui->lineEdit_2->setText(input);
                              Now I want to use this "input" in which I already stored value to update my out_altvoltage1_TX_LO_frequency.
                              //
                              Detail explenation of my work:
                              Step 1:
                              I firstly executed following commands on my board where I am deploying my project like this:

                              cd /sys/bus/iio/devices/iio:device1/
                              echo 111111 > out_altvoltage1_TX_LO_frequency
                              This worked fine;
                              Step 2:
                              I create project on my PC using following commands and GUI.

                              system("cd /sys/bus/iio/devices/iio:device1/; echo 222222 > out_altvoltage1_TX_LO_frequency");
                              QProcess process1;
                              process1.start("cat /sys/bus/iio/devices/iio:device1/out_altvoltage1_TX_LO_frequency");
                              process1.waitForFinished(-1); // will wait forever until finished
                              QString stdout1 = process1.readAllStandardOutput();
                              qDebug() << stdout1;
                              ui->lineEdit_3->setText(stdout1);
                              This also work correctly.
                              Step 3:
                              Now, because it is my task requirement that I need update register (out_altvoltage1_TX_LO_frequency) value at real-time, depends on the situation not remained fixed like (222222), therefore I update code like this:

                              QString input = ui->lineEdit_1->text();
                              ui->lineEdit_2->setText(input);
                              QFile f("/sys/bus/iio/devices/iio:device1/input");
                              if (f.open(QIODevice::ReadOnly | QIODevice::Text))
                              {
                              QByteArray ba = f.readAll();
                              ui->lineEdit_3->setText(QString(ba));
                              f.close();
                              }

                              whenever I will enter a new value to lineEdit_1 that should update register (out_altvoltage1_TX_LO_frequency) immediately,

                              this code not working as my requirements.

                              J Offline
                              J Offline
                              jsulm
                              Lifetime Qt Champion
                              wrote on 24 Oct 2019, 06:19 last edited by
                              #13

                              @Mijaz OK, that means you want to write to /sys/bus/iio/devices/iio:device1/out_altvoltage1_TX_LO_frequency file, because

                              cd /sys/bus/iio/devices/iio:device1/
                              echo 111111 > out_altvoltage1_TX_LO_frequency
                              

                              does exactly that.
                              Then simply use QFile to write:

                              QFile f("/sys/bus/iio/devices/iio:device1/out_altvoltage1_TX_LO_frequency");
                              if (f.open(QIODevice::WriteOnly | QIODevice::Text)) {
                                  f.write(ui->lineEdit_2->text().toLatin1());
                                  f.close();
                              }
                              

                              https://forum.qt.io/topic/113070/qt-code-of-conduct

                              M 2 Replies Last reply 24 Oct 2019, 06:42
                              1
                              • J jsulm
                                24 Oct 2019, 06:19

                                @Mijaz OK, that means you want to write to /sys/bus/iio/devices/iio:device1/out_altvoltage1_TX_LO_frequency file, because

                                cd /sys/bus/iio/devices/iio:device1/
                                echo 111111 > out_altvoltage1_TX_LO_frequency
                                

                                does exactly that.
                                Then simply use QFile to write:

                                QFile f("/sys/bus/iio/devices/iio:device1/out_altvoltage1_TX_LO_frequency");
                                if (f.open(QIODevice::WriteOnly | QIODevice::Text)) {
                                    f.write(ui->lineEdit_2->text().toLatin1());
                                    f.close();
                                }
                                
                                M Offline
                                M Offline
                                Mijaz
                                wrote on 24 Oct 2019, 06:42 last edited by
                                #14

                                @jsulm

                                QFile f("/sys/bus/iio/devices/iio:device1/out_altvoltage1_TX_LO_frequency");
                                if (f.open(QIODevice::WriteOnly | QIODevice::Text))
                                {
                                f.write(ui->lineEdit_2->text().toLatin1());
                                f.close();
                                }

                                this still not updating register ( out_altvoltage1_TX_LO_frequency) value.

                                J 1 Reply Last reply 24 Oct 2019, 06:45
                                0
                                • M Mijaz
                                  24 Oct 2019, 06:42

                                  @jsulm

                                  QFile f("/sys/bus/iio/devices/iio:device1/out_altvoltage1_TX_LO_frequency");
                                  if (f.open(QIODevice::WriteOnly | QIODevice::Text))
                                  {
                                  f.write(ui->lineEdit_2->text().toLatin1());
                                  f.close();
                                  }

                                  this still not updating register ( out_altvoltage1_TX_LO_frequency) value.

                                  J Offline
                                  J Offline
                                  jsulm
                                  Lifetime Qt Champion
                                  wrote on 24 Oct 2019, 06:45 last edited by
                                  #15

                                  @Mijaz You still did not answer any of my previous questions?
                                  Did you check what happens? Please use debugger and see whether your if block was executed at all.
                                  Did you check return value of open()?
                                  Did you check what https://doc.qt.io/qt-5/qiodevice.html#errorString returns?

                                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  JonBJ M 2 Replies Last reply 24 Oct 2019, 07:22
                                  2
                                  • J jsulm
                                    24 Oct 2019, 06:45

                                    @Mijaz You still did not answer any of my previous questions?
                                    Did you check what happens? Please use debugger and see whether your if block was executed at all.
                                    Did you check return value of open()?
                                    Did you check what https://doc.qt.io/qt-5/qiodevice.html#errorString returns?

                                    JonBJ Offline
                                    JonBJ Offline
                                    JonB
                                    wrote on 24 Oct 2019, 07:22 last edited by JonB
                                    #16

                                    @jsulm
                                    Do you realise this thread is just a rehash of @Mijaz's own https://forum.qt.io/topic/107974/system-vs-process-command/ ? He asks exactly the same question there. You will see the same questions about the cat command and the same answers about using QFile, the same issue about the current directory and paths, .... I tried to help, but he chose not to supply the necessary information, and is just going through the same stuff again. It gets so frustrating here when people choose not to follow through the advice they are given when they do not like it, and instead create a new thread to get the information all over again...

                                    J 1 Reply Last reply 24 Oct 2019, 07:25
                                    0
                                    • JonBJ JonB
                                      24 Oct 2019, 07:22

                                      @jsulm
                                      Do you realise this thread is just a rehash of @Mijaz's own https://forum.qt.io/topic/107974/system-vs-process-command/ ? He asks exactly the same question there. You will see the same questions about the cat command and the same answers about using QFile, the same issue about the current directory and paths, .... I tried to help, but he chose not to supply the necessary information, and is just going through the same stuff again. It gets so frustrating here when people choose not to follow through the advice they are given when they do not like it, and instead create a new thread to get the information all over again...

                                      J Offline
                                      J Offline
                                      jsulm
                                      Lifetime Qt Champion
                                      wrote on 24 Oct 2019, 07:25 last edited by
                                      #17

                                      @JonB Yes, I saw that thread and I agree that it is very frustrating if people do not answer questions and do not follow advices - what's the point to ask then in a forum? But it is how it is...

                                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                                      1 Reply Last reply
                                      0
                                      • J jsulm
                                        24 Oct 2019, 06:45

                                        @Mijaz You still did not answer any of my previous questions?
                                        Did you check what happens? Please use debugger and see whether your if block was executed at all.
                                        Did you check return value of open()?
                                        Did you check what https://doc.qt.io/qt-5/qiodevice.html#errorString returns?

                                        M Offline
                                        M Offline
                                        Mijaz
                                        wrote on 24 Oct 2019, 07:38 last edited by
                                        #18

                                        @jsulm
                                        Thank you so much for your kind help to find a proper solution.

                                        J 1 Reply Last reply 24 Oct 2019, 07:50
                                        1
                                        • M Mijaz
                                          24 Oct 2019, 07:38

                                          @jsulm
                                          Thank you so much for your kind help to find a proper solution.

                                          J Offline
                                          J Offline
                                          jsulm
                                          Lifetime Qt Champion
                                          wrote on 24 Oct 2019, 07:50 last edited by
                                          #19

                                          @Mijaz Does it work now?

                                          https://forum.qt.io/topic/113070/qt-code-of-conduct

                                          M 1 Reply Last reply 24 Oct 2019, 08:58
                                          0
                                          • J jsulm
                                            24 Oct 2019, 07:50

                                            @Mijaz Does it work now?

                                            M Offline
                                            M Offline
                                            Mijaz
                                            wrote on 24 Oct 2019, 08:58 last edited by
                                            #20

                                            @jsulm
                                            yes, it is working correctly.

                                            1 Reply Last reply
                                            0

                                            1/22

                                            24 Oct 2019, 04:57

                                            • Login

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