Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Shell scripts ---> GUI w/ Qt?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
jerome187
Guru
Guru


Joined: 29 Apr 2003
Posts: 584

PostPosted: Sun May 25, 2003 2:41 am    Post subject: Shell scripts ---> GUI w/ Qt? Reply with quote

Can I use Qt to make QUI's for my shell script? Heres what i have so far (it dosent work right tho)

i know its pathethic, but i'm pretty new at this, so try not to laugh too much :wink:

Code:
echo "Hello, welcome to matchstick.  You must be root to use this script."

echo "Enter full path of target directory to be burned: "
read $path

cd $path

echo "Enter target directory to be burned: (must add a space and . to the end)"
read $dir

echo "Enter target device (usually 0,0,0 but if unsure open another konsole and execute cdrecord -scanbus)"
read $targetdev

mkisofs -R -J  -o $dir

echo "Thank you for using Matchstick!"


Its only using mkisofs and cdrecord for right now (dont try to use this script it dosent work right)
Back to top
View user's profile Send private message
Pythonhead
Developer
Developer


Joined: 16 Dec 2002
Posts: 1801
Location: Redondo Beach, Republic of Calif.

PostPosted: Sun May 25, 2003 3:29 am    Post subject: Reply with quote

In a word 'no', you can't use QT for your shell script because QT uses C++. However, if you don't want to use C++, there are bindings for other languages like Python or Perl.

Here's one for Python
http://www.riverbankcomputing.co.uk/pyqt/index.php

Here's one for Perl
http://www.surf.org.uk/vperlqt/
Back to top
View user's profile Send private message
jerome187
Guru
Guru


Joined: 29 Apr 2003
Posts: 584

PostPosted: Sun May 25, 2003 4:10 am    Post subject: Reply with quote

well, is there a way to run other programs (like mkisofs and cdrecord) from C++?
Back to top
View user's profile Send private message
Pythonhead
Developer
Developer


Joined: 16 Dec 2002
Posts: 1801
Location: Redondo Beach, Republic of Calif.

PostPosted: Sun May 25, 2003 6:06 am    Post subject: Reply with quote

[quote="jerome187"]well, is there a way to run other programs (like mkisofs and cdrecord) from C++?[/quote]

Yes, but the learning curve for C++ is steep and creating GUIs isn't something you'd be able to tackle until you're proficient in C++. Just take a look at a 'simple' C++/qt application and you'll see quite a bit of code.

You could learn a scripting language in a fraction of the time it would take you to learn C++, so you could write your app in hours instead of weeks.
Back to top
View user's profile Send private message
jerome187
Guru
Guru


Joined: 29 Apr 2003
Posts: 584

PostPosted: Sun May 25, 2003 7:56 am    Post subject: Reply with quote

i emerged PyQt with no probs but how am i supposed to use it? the progs homepage you posted isnt workin for me.

i cant get PerlQt to emerge tho, but their homepage works :P

Phooie!!
Back to top
View user's profile Send private message
Pythonhead
Developer
Developer


Joined: 16 Dec 2002
Posts: 1801
Location: Redondo Beach, Republic of Calif.

PostPosted: Sun May 25, 2003 8:04 am    Post subject: Reply with quote

jerome187 wrote:
i emerged PyQt with no probs but how am i supposed to use it? the progs homepage you posted isnt workin for me.

i cant get PerlQt to emerge tho, but their homepage works :P

Phooie!!


Here's an entire book on pyqt with plenty of sample code to learn from:

http://www.opendocs.org/pyqt/
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum