Results 1 to 2 of 2

Thread: Qprocess question

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

    Default Qprocess question

    I'm new to QT programming.

    I'm creating an interface that consists of few buttons.
    One of the button will used to call another program once event of clicked is activated.
    I want to call program "Blender.exe", any sample/tutorial?

    I tried this, but failed:
    void MainWindow:n_pb_blender_clicked()
    {
    QString program = "C:/Program Files/Blender Foundation/Blender/time1.txt";
    QProcess *myProcess = new QProcess(this);
    myProcess->start(program);
    }

    This is the first problem.




    Then after this button had been clicked, the program will start.
    Now I want link a button inside my interface to a button inside the "Blender" program.
    How could I do this? Is it possible?
    Thanks

  2. #2
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Thanks
    3
    Thanked 106 Times in 103 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qprocess question

    You're trying to open txt file, no wonder it doesn't do what you want

    This is what you want:
    Qt Code:
    1. QProcess* prc = new QProcess(this);
    2. prc->start( "C:\\Windows\\system32\\notepad.exe" );
    To copy to clipboard, switch view to plain text mode 

    As to linking button from your app to button inside Blender app, AFAIK it's impossible.

    ps. use [code] tags.

Similar Threads

  1. A question about QProcess
    By franco.amato in forum Qt Programming
    Replies: 4
    Last Post: 2nd August 2011, 18:27
  2. QProcess question
    By jaxrpc in forum Newbie
    Replies: 1
    Last Post: 4th June 2010, 14:10
  3. QProcess question
    By PH5 in forum Newbie
    Replies: 0
    Last Post: 5th February 2010, 00:43
  4. QProcess question
    By lni in forum Qt Programming
    Replies: 3
    Last Post: 19th July 2007, 20:06
  5. QProcess Question
    By Vash5556 in forum Qt Programming
    Replies: 1
    Last Post: 26th February 2007, 17:24

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.