Results 1 to 4 of 4

Thread: [Solved]I can't make QProcess work

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2016
    Posts
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default [Solved]I can't make QProcess work

    I am trying to get a Linux console output. Here is my code
    Qt Code:
    1. p.start("gsettings get org.gnome.desktop.wm.preferences theme");
    2. QString p_stdout = p.readAllStandardOutput();
    3. p.waitForFinished();
    4. qDebug()<<"theme ="<<p_stdout;
    To copy to clipboard, switch view to plain text mode 
    in terminal, I get Ambiance output which is my current theme. But QT terminal gives theme ="" output.
    What am I doing wrong?
    Thanks
    Last edited by Nirvana; 22nd January 2016 at 21:40.

Similar Threads

  1. QProcess does not work in service
    By yasjera in forum Qt Programming
    Replies: 5
    Last Post: 6th June 2014, 11:03
  2. IPC using QProcess , connect and finish does not work
    By PstdEr in forum Qt Programming
    Replies: 1
    Last Post: 28th April 2013, 00:43
  3. QProcess::start not work in windows 7
    By renocz in forum Qt Programming
    Replies: 0
    Last Post: 3rd April 2013, 14:47
  4. cant make QSound work
    By akon in forum Newbie
    Replies: 8
    Last Post: 19th March 2009, 15:34
  5. how to make these contents work??
    By srohit24 in forum Qt Programming
    Replies: 2
    Last Post: 2nd March 2009, 14:02

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.