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. Run windows command line
Forum Updated to NodeBB v4.3 + New Features

Run windows command line

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 778 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.
  • K Offline
    K Offline
    krustasia
    wrote on last edited by
    #1

    How do make a gui to display output of cmd? e.g.:
    @echo %COMPUTERNAME%@

    1 Reply Last reply
    0
    • K Offline
      K Offline
      krustasia
      wrote on last edited by
      #2

      Thanks for the example

      With that I came to

      @void MainWindow::onReadyRead()
      {
      //qDebug() << "onReadyread:" <<
      //myProcess->readAllStandardOutput();
      ui->label->setText(myProcess->readAllStandardOutput());
      }@

      Evenso, it did not only output computername, but also output that always comes out during build which is

      @C:\Users\krustasia\Documents\qtworkspace\build-cmdTest-Desktop_Qt_5_1_1_MinGW_32bit-Debug\debug\cmdTest.exe exited with code 0@

      Sometimes only the above depends on size of label boundary.

      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