Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 08-22-2002, 06:12 AM   #1
Registered: Jun 2002
Location: Batu Puteh, Malaysia
Distribution: (Mandrake 8.2) (Redhat 7.2,8.0,9.0) (Slackware 9.0,9.1)
Posts: 154

Rep: Reputation: 30
QT --how to do a shell command

I want to develop a Program that can execute a shell commad like rpm or whatever. Let say my application only contain a button. When a user click that button it will execute a "rpm -qa | grep lex" for example. How can I do this. Let assume I'm a total newbie. Source code would help. Thanks
Old 08-22-2002, 08:11 AM   #2
Registered: Jul 2002
Location: Florida
Distribution: Centos, Slackware
Posts: 260

Rep: Reputation: 30
I'm not a QT programmer, but a search on google for "QT system command" came up with this hit which seems to provide a possible solution for you.

Old 08-22-2002, 02:27 PM   #3
Registered: Nov 2001
Location: London, England
Distribution: Gentoo, FreeBSD
Posts: 590

Rep: Reputation: 30
You don't have to use qt. UNIX has the system() functin which executes a shell command. Not sure which header you have to include to use it, but it think it's <syscall.h>



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
command to go up a level in the shell dr_zayus69 Linux - Newbie 3 01-06-2005 03:36 PM
Shell Command rakriege Linux - General 1 10-04-2004 04:21 PM
Shell command (Try this out!!!!!!!) vbhatia_81 Programming 6 06-23-2004 02:43 AM
what is the shell command to.... praefex Linux - Newbie 2 08-18-2003 05:25 PM
shell command i_is_cat Linux - General 1 08-13-2003 03:09 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:30 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration