|
Page 1 of 2 |
|
1
2
|
Next
Q: Execute terminal command from an application
Hello!
I have done few basic applications for my own usage and fun. I haven't found any kind of information of how to execute a command through terminal? For instance, let's say that I would like to simply display a basic functions such as showing the IP. How am I able to do that? Do I need to call the command through SSH or directly into terminal? Appreciated! :) |
Re: Q: Execute terminal command from an application
what is your application language? :)
|
Re: Q: Execute terminal command from an application
Oops.. :o
Well, mainly I've used QML and I would like to stick with that because it was the easiest for me to understand for some reason. But if it can not be done with QML then any other options? :) |
Re: Q: Execute terminal command from an application
See this post: http://talk.maemo.org/showpost.php?p...45&postcount=2
|
Re: Q: Execute terminal command from an application
Nice one, exactly what I was looking for. Thank you very much! :)
But I have a question which I couldn't figure out - at least not yet. Let's say I'd like to list the current files and folders in directory "/home/user/" for example, how I do that? EDIT * I do know that using 'ls' or 'ls -a' lists the files and folders, but how I make the list using using TextArea for example. I don't actually need that one yet, but for future projects if I need it some day. |
Re: Q: Execute terminal command from an application
Quote:
Code:
Page { |
Re: Q: Execute terminal command from an application
Sweetness! Thank you very much mate. :)
|
Re: Q: Execute terminal command from an application
Hmm.. I have a problem that I just can not figure out by myself.
When I use your qdeclarativesettings.h and *.cpp files it complains about the <QDeclarativeProcess> in main.cpp file. Well, I found your qdeclarativeprocess.h and *.cpp files and that made it. However it now complains about "...\main.cpp:13: error: no matching function for call to 'qmlRegisterUncreatableType(const char [24], int, int, const char [10])'". Here's the main.cpp file: Code:
#include <QtGui/QApplication>Any advice what I'm doing wrong here? I have added *.cpp and *.h files in *.pro file so that should not be a problem. |
Re: Q: Execute terminal command from an application
Quote:
Code:
qmlRegisterUncreatableType<QDeclarativeProcessEnums>("org.component.Processes", 1, 0, "Processes", "Cannot be created in QML"); |
Re: Q: Execute terminal command from an application
EDIT: Alles goed! Just noticed that of course the SSH commands can not work if not using N9 itself for testing. :)
Quote:
It still gives me only error no matter what command I'm trying to execute. I've tried 'ls' 'ls -a' 'ls /' etc. I've also tried with and without the workingDirectory property. I've tried to call the Process QML from Page QML's Component.onCompleted and on button click. Neither of 'em have worked. |
| All times are GMT. The time now is 10:43. |
Page 1 of 2 |
|
1
2
|
Next
vBulletin® Version 3.8.8