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. Using windows cmd in programs
Forum Updated to NodeBB v4.3 + New Features

Using windows cmd in programs

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

    hi,
    let say i need cmd commands in my program i mean when user click on the ping the program go to cmd type ping google.com and show result not only for ping command for any command in cmd like cd dir.........
    is there any class in standard c++ or c++11 or Qt do this???
    Note: i dont want to show the result in cmd i mean my program must copy the result from cmd and show in text field or text browser or any thing else.
    any guidance will be grateful.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      DBoosalis
      wrote on last edited by
      #2

      Look at QProcess, should do exactly what you want for the ping. But for the cd thats a challenge to do generically. What are you trying to achieve with the "cd" - change the working directory? You can do that with the QDir::setCurrent()

      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