Results 1 to 13 of 13

Thread: Using the Stdout reading in QProcess

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Using the Stdout reading in QProcess

    you have a typo in your signal name is should be readyReadyStandardOutput() (ready not read)
    The warning tells you exactly what the problem is!
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  2. #2
    Join Date
    Sep 2010
    Posts
    12
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Using the Stdout reading in QProcess

    Problem solved!!!
    Thanks high_flyer
    PS. Google Traductor and my few english let me knows you were getting a little desesperate.
    But thanks

    It should be like this at the end

    Qt Code:
    1. void MainWindow::on_pb_new_package_clicked()
    2. {
    3. QString install="pwd";//"gksudo apt-get install build-essential devscripts ubuntu-dev-tools debhelper dh-make diff patch gnupg fakeroot lintian pbuilder";
    4. process->setProcessChannelMode(QProcess::MergedChannels);
    5. connect(process,SIGNAL(readyReadStandardOutput()),this, SLOT( _readstdoutput()));
    6. process->start(install);
    7. }
    8.  
    9. void MainWindow::_readstdoutput()
    10. {
    11. QByteArray ca=process->readAllStandardOutput();
    12. QString a(ca);
    13. ui->textEdit->setText(a);
    14. }
    To copy to clipboard, switch view to plain text mode 

  3. #3
    Join Date
    Jul 2011
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Using the Stdout reading in QProcess

    Thanks.
    It would be helpful for newbies like myself to have a complete and working designer project available, which I could then modify. I would be very grateful.
    Ekkehart

Similar Threads

  1. QProcess can read stderr but no stdout
    By mastupristi in forum Qt Programming
    Replies: 3
    Last Post: 21st October 2010, 09:47
  2. Read most recent output from QProcess's stdout
    By Lawand in forum Qt Programming
    Replies: 1
    Last Post: 8th September 2010, 22:29
  3. read stdout with QProcess under Windows
    By jlbrd in forum Qt Programming
    Replies: 4
    Last Post: 1st September 2006, 17:29
  4. QProcess problem in accessing stdout
    By aruna in forum Qt Programming
    Replies: 1
    Last Post: 19th April 2006, 17:56
  5. Cannot get stdout from QProcess
    By johnny_sparx in forum Qt Programming
    Replies: 11
    Last Post: 3rd March 2006, 11:46

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.