Reply
Thread Tools
Posts: 144 | Thanked: 68 times | Joined on Mar 2011 @ a spot
#1
Hi,

So I decided I want to make an app, a very simple one. It would be a window, with buttons, and each button executes a command in xterm while in root. Commands that I will need will be wget, tar, cd, bzip2...

Anybody's help?
 
Posts: 662 | Thanked: 653 times | Joined on Feb 2010
#2
Can be done easily in Qt. You're going to want to use QWidget (obviously), QPushButton, and QProcess. You'll also probably want any of the layout classes.

You could also do it in QML, but you'll need to integrate Qt/C++ in order to actually execute the commands. QML doesn't have a QProcess equivalent.

Last edited by Reffyyyy; 2011-08-21 at 19:57.
 

The Following User Says Thank You to Reffyyyy For This Useful Post:
Posts: 144 | Thanked: 68 times | Joined on Mar 2011 @ a spot
#3
Originally Posted by Reffyyyy View Post
Can be done easily in Qt. You're going to want to use QWidget (obviously), QPushButton, and QProcess. You'll also probably want any of the layout classes.

You could also do it in QML, but you'll need to integrate Qt/C++ in order to actually execute the commands. QML doesn't have a QProcess equivalent.
So, Nokia Qt SDK should provide all of what I will need, right?

Last edited by GigaByte; 2011-08-21 at 20:30.
 
marxian's Avatar
Posts: 2,448 | Thanked: 9,523 times | Joined on Aug 2010 @ Wigan, UK
#4
After installing Qt SDK, you will need add the Maemo target via the SDK Maintenance Tool. Then you have everything you need to create and deploy a Maemo Qt application.
__________________
'Men of high position are allowed, by a special act of grace, to accomodate their reasoning to the answer they need. Logic is only required in those of lesser rank.' - J K Galbraith

My website

GitHub
 

The Following User Says Thank You to marxian For This Useful Post:
Banned | Posts: 726 | Thanked: 497 times | Joined on Aug 2010 @ Gravesend, UK
#5
Congratulations to Marxypoos for his 1000th post \o/ ;-)
 
qwazix's Avatar
Moderator | Posts: 2,622 | Thanked: 5,447 times | Joined on Jan 2010
#6
I'd use python with pyQT no development environment needed and you can develop right on your phone

Code:
#!/usr/bin/python
from PyQt4 import QtGui
import sys
import os


g=QtGui
app=g.QApplication(sys.argv)
window= g.QWidget()
label=g.QLabel('hw')
button=g.QPushButton('run vi')

button.clicked.connect(lambda: os.system('vi'))
layout = g.QVBoxLayout()
window.setLayout(layout)
layout.addWidget(label)
layout.addWidget(button)
window.show()
sys.exit(app.exec_())
then run python whatever.py, it will show a label and a button that rns vi in the same terminal window
 

The Following 4 Users Say Thank You to qwazix For This Useful Post:
Posts: 291 | Thanked: 435 times | Joined on Apr 2011 @ RO
#7
why not python? I think it is simpler
 

The Following User Says Thank You to SHARP66 For This Useful Post:
Posts: 1,751 | Thanked: 844 times | Joined on Feb 2010 @ Sweden
#8
QT is good but you have other options too... a simpler one would be to use Python with Bash or a simple dialog like Zenity and Bash. If you are familiar with shell scripting that would be the easiest way. Neither Python nor bash would require an DE or SDK to be installed. You could make the Python UI with QT Designer though if you prefer wysiwyg.

The Zenity way would probably be the easiest but maybe not what you are after.
__________________
You like what i do? Donate!

Make your desktop look awesome - use the AwOken Theme with the AwOken Icon Theme.

Add me on twitter @almehdin
Visit the swedish maemo/meego community forums

Last edited by AlMehdi; 2011-08-21 at 21:53.
 
Posts: 37 | Thanked: 191 times | Joined on Nov 2009 @ Finland
#9
First do you know how to code? If not learn basics of some programming language. I recommend python or c++. Forget about GUI programming (Qt) and learn to make simple command line applications (Hello World and stuff). This may sound dull and you wanna make something cool but it will help you ALOT in the future. Start learning Qt when you have enought experience with some programming language.
__________________
My applications:
gTranslate
Battery widget
Guitar Chords
 

The Following 2 Users Say Thank You to TomppaS For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 16:57.