|
2011-02-25
, 19:49
|
Posts: 1,751 |
Thanked: 844 times |
Joined on Feb 2010
@ Sweden
|
#2
|
|
2011-02-25
, 19:53
|
Posts: 3,319 |
Thanked: 5,610 times |
Joined on Aug 2008
@ Finland
|
#3
|
The Following User Says Thank You to attila77 For This Useful Post: | ||
|
2011-02-25
, 19:57
|
Posts: 1,751 |
Thanked: 844 times |
Joined on Feb 2010
@ Sweden
|
#4
|
def open(dialog): f = ("/home/daniel/Hämtningar/n900/awoken-extras/test.sh"); import subprocess subprocess.call("/bin/sh " + f, shell=True); def dialog(pushButton_2): f = ("/home/daniel/Hämtningar/n900/awoken-extras/test.sh"); from subprocess import Popen Popen('/bin/sh ' + f);
|
2011-02-26
, 10:29
|
Posts: 1,751 |
Thanked: 844 times |
Joined on Feb 2010
@ Sweden
|
#5
|
self.retranslateUi(dialog) QtCore.QObject.connect(self.pushButton, QtCore.SIGNAL(_fromUtf8("clicked()")), self.open) def open(self): f = ("/home/daniel/Hämtningar/n900/awoken-extras/test.sh"); import subprocess subprocess.call(["/bin/sh " + f]);
Traceback (most recent call last): File "awoken.py", line 82, in <module> ui.setupUi(dialog) File "awoken.py", line 43, in setupUi QtCore.QObject.connect(self.pushButton, QtCore.SIGNAL(_fromUtf8("clicked()")), self.open)
|
2011-02-26
, 15:55
|
Posts: 1,751 |
Thanked: 844 times |
Joined on Feb 2010
@ Sweden
|
#6
|
self.retranslateUi(MainWindow) QtCore.QObject.connect(self.pushButton, QtCore.SIGNAL(_fromUtf8("clicked()")), self.change) QtCore.QObject.connect(self.pushButton_3, QtCore.SIGNAL(_fromUtf8("clicked()")), self.backup) QtCore.QObject.connect(self.pushButton_2, QtCore.SIGNAL(_fromUtf8("clicked()")), self.reset) QtCore.QObject.connect(self.pushButton_4, QtCore.SIGNAL(_fromUtf8("clicked()")), MainWindow.close) QtCore.QMetaObject.connectSlotsByName(MainWindow) def change(self): os.system("/home/daniel/Hämtningar/n900/awoken-extras/test.sh"); def backup(self): os.system("/home/daniel/Hämtningar/n900/awoken-extras/test.sh"); def reset(self): os.system("/home/daniel/Hämtningar/n900/awoken-extras/test.sh");
So where am i going wrong?
(attaching the complete file below)
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-02-28 at 22:57.