LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 08-22-2002, 06:12 AM   #1
linuxlah
Member
 
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
bbeers
Member
 
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.

http://lists.trolltech.com/qt-intere...ad01108-0.html

-bbeers
 
Old 08-22-2002, 02:27 PM   #3
llama_meme
Member
 
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>

Alex
 
  


Reply


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


All times are GMT -5. The time now is 07:20 PM.

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