LinuxQuestions.org
Visit Jeremy's Blog.
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 09-08-2004, 04:34 PM   #1
Boffy
Member
 
Registered: Jul 2003
Location: Durham, UK
Distribution: Ubuntu 8.04
Posts: 419

Rep: Reputation: 30
Basic Linux Programming Question (QT terminal control)


How can I issue commands like the ones I do from the terminal from a QT GUI program.

Boffy
 
Old 09-08-2004, 07:44 PM   #2
irfanhab
Member
 
Registered: Jan 2004
Location: Pakistan
Distribution: OpenSuse 10.2, Slackware 11, Solaris 10
Posts: 415

Rep: Reputation: 34
You mean accessing the terminal from a Qt program?
go
system("command")
defined in header stdlib.h
 
Old 09-09-2004, 12:53 AM   #3
gizmo_thunder
Member
 
Registered: Apr 2004
Posts: 101

Rep: Reputation: 15
you might want to try qthread for creating a thread and
then call the system command coz the system( ) call would
suspend the refresh of the qt program.. ie it would not refresh
the display of qt widget unless the program started by system
ends..
 
Old 09-09-2004, 05:03 AM   #4
phoenix7
Member
 
Registered: Aug 2004
Distribution: Mandrake 10.2(Mandriva), SuSE 9.3, Slackware 9.1, Xandros 3.1, Knoppix 3.9, FreeBSD 5.3, RedHat9
Posts: 122

Rep: Reputation: 15
Hi
If you want input and output from konsole.
You CAN use cin and cout.
 
Old 09-09-2004, 06:26 AM   #5
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
man QProcess may help also
 
Old 09-09-2004, 12:44 PM   #6
irfanhab
Member
 
Registered: Jan 2004
Location: Pakistan
Distribution: OpenSuse 10.2, Slackware 11, Solaris 10
Posts: 415

Rep: Reputation: 34
Quote:
Hi
If you want input and output from konsole.
You CAN use cin and cout.
Here is is best to use
QProcess

another sloppy way is to use the system("") command and direct to output with ">" to a file and than read the file into your program

But I definitely recommend using QProcess

in terminal go
assitant
and than go to QProcess
 
  


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
basic java programming question nkoplm Programming 3 09-22-2005 01:37 AM
I want some guide to know the basic about device drivers programming in linux. kadhiravan.r Linux - Software 2 07-18-2005 07:07 AM
basic linux programming/compiling question (permissions error) Godsmacker777 Programming 11 03-17-2005 11:35 AM
Programming - Linux TCP Congestion Control smokey1582 Programming 1 10-22-2004 04:07 PM
A Basic Terminal Connectivity Question Soulful93 Linux - Newbie 2 02-17-2004 06:56 PM


All times are GMT -5. The time now is 10:51 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