Results 1 to 3 of 3

Thread: Help with Qprocess and sending commands to terminal

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Help with Qprocess and sending commands to terminal

    The subprocess communication for QProcess is typically handled asynchronously by connecting to the readyRead() signal etc.

    If you want a top-to-bottom synchronous telnet session then you should look at the waitForBytesWritten() and waitForReadyRead() function on the QProcess object.
    "We can't solve problems by using the same kind of thinking we used when we created them." -- Einstein
    If you are posting code then please use [code] [/code] tags around it - makes addressing the problem easier.

  2. #2
    Join Date
    Dec 2017
    Posts
    6
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: Help with Qprocess and sending commands to terminal

    Thanks Chris,

    I have read the documentation on QProcess. I've also used waitForBytesWritten() and saw it returns the numbers of bytes the device wants to write or 0 in some cases.

    Now I will experiment more with readyRead () and see what I can come up with.

    If any one else has extra suggestions they are welcomed too.

Similar Threads

  1. Sending command to terminal
    By dcasey627 in forum Newbie
    Replies: 3
    Last Post: 4th April 2016, 08:27
  2. Sending commands throught network
    By franco.amato in forum Newbie
    Replies: 1
    Last Post: 26th March 2012, 22:33
  3. Opening A Terminal using QProcess
    By sujan.dasmahapatra in forum Qt Programming
    Replies: 1
    Last Post: 3rd February 2011, 14:51
  4. Replies: 12
    Last Post: 11th September 2010, 01:39
  5. serial port printer sending commands, how?
    By triperzonak in forum Qt Programming
    Replies: 3
    Last Post: 6th April 2009, 14:51

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.