Results 1 to 6 of 6

Thread: How to Get Konsole Command Output?

  1. #1
    Join Date
    Apr 2010
    Posts
    31
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60

    Question How to Get Konsole Command Output?

    Hello Guys!
    I've been trying to get the output of a konsole command output. (I'm trying to get Wget's output) I've tried QProecess, readyReadStandardError etc. But I couldn't get the result. Can anyone help me with that?
    Thanks in advance!

  2. #2
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to Get Konsole Command Output?

    QProcess is a correct way ..
    I've tried QProecess, readyReadStandardError etc. But I couldn't get the result
    can u show us how u implement the QProcess
    "Behind every great fortune lies a crime" - Balzac

  3. #3
    Join Date
    Apr 2010
    Posts
    31
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60

    Default Re: How to Get Konsole Command Output?

    QProcess process;
    process.setProcessChannelMode(QProcess::MergedChan nels);
    process.execute("wget http://27.media.tumblr.com/tumblr_l0d8uj2Ou41qbut2yo1_400.jpg");
    process.waitForFinished();
    QString str = process.readAll();
    Also I tried the readyReadStandartOutput signal. But I couldn't get the Wget's output.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to Get Konsole Command Output?

    Do you mean "console" or "konsole" (as in KDE terminal emulator program)?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Apr 2010
    Posts
    31
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60

    Default Re: How to Get Konsole Command Output?

    I mean "Konsole".

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to Get Konsole Command Output?

    In that case you can't. Konsole doesn't output what it displays. If you really need it you can tee (man tee) the output from wget to some file or named pipe and read it from there before it reaches Konsole.

Similar Threads

  1. Replies: 7
    Last Post: 20th October 2012, 13:44
  2. Replies: 4
    Last Post: 14th July 2009, 03:27
  3. Read/Write on a konsole from Qt app
    By Joccy in forum Qt Programming
    Replies: 9
    Last Post: 4th February 2008, 12:21
  4. output UTF?
    By mikro in forum Newbie
    Replies: 4
    Last Post: 18th May 2006, 23:00
  5. dislplay info in konsole?
    By lum in forum KDE Forum
    Replies: 1
    Last Post: 27th April 2006, 16:49

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.