Results 1 to 6 of 6

Thread: How to run shell scripts ?

  1. #1
    Join Date
    Mar 2006
    Posts
    53
    Thanks
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default How to run shell scripts ?

    Hi,

    I am working in a Linux box, Using Qt 3.3.4, I dont know how to run shell scripts from the code. Is there any command to execute the shell commands ?

    Plz let me know, If you know.

    Thanks in advance.
    -Deep

  2. #2
    Join Date
    Jan 2006
    Location
    India
    Posts
    54
    Thanks
    1
    Thanked 7 Times in 6 Posts
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: How to run shell scripts ?

    use system() command

  3. #3
    Join Date
    Jan 2006
    Location
    Ukraine,Lviv
    Posts
    454
    Thanks
    9
    Thanked 27 Times in 27 Posts
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: How to run shell scripts ?

    or maiby QProcess
    a life without programming is like an empty bottle

  4. The following user says thank you to zlatko for this useful post:

    npc (22nd May 2006)

  5. #4
    Join Date
    Mar 2006
    Posts
    53
    Thanks
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to run shell scripts ?

    Thank you sumsin and zlatko,

    Hi sumsin, could you tell me what is the header file for system () command.

  6. #5
    Join Date
    Mar 2006
    Posts
    53
    Thanks
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to run shell scripts ?

    Its working for me now , thank you.
    The header file for system () command is stdlib.h

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

    Default Re: How to run shell scripts ?

    Just remember that system() blocks your entire application (or at least the thread where it was invoked) until the external process is finished.

Similar Threads

  1. qprocess and shell
    By GuL in forum Qt Programming
    Replies: 1
    Last Post: 12th February 2009, 05:47
  2. Shell opens when start Qt app
    By giusepped in forum Qt Programming
    Replies: 15
    Last Post: 2nd February 2009, 06:20
  3. Shell inside QT WIdget
    By pshah.mumbai in forum Qt Programming
    Replies: 4
    Last Post: 17th September 2008, 17:57
  4. QSA scripts: how to wait for events?
    By olberg in forum Qt Programming
    Replies: 2
    Last Post: 17th May 2006, 14:56
  5. QSA: loading scripts at runtime
    By seneca in forum Qt Programming
    Replies: 0
    Last Post: 15th February 2006, 15:19

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.