|
2010-02-08
, 00:34
|
Posts: 26 |
Thanked: 7 times |
Joined on Feb 2010
@ São Paulo - Brazil
|
#52
|
Double check you are not trying to run the 32 version on your 64 machine. There are two installers on the page, it might sound silly but make sure you've got the proper version
|
2010-02-08
, 00:46
|
Posts: 1,086 |
Thanked: 2,964 times |
Joined on Jan 2010
|
#53
|
The Following User Says Thank You to kojacker For This Useful Post: | ||
|
2010-02-08
, 00:49
|
Posts: 3,428 |
Thanked: 2,856 times |
Joined on Jul 2008
|
#54
|
I intentionally threw out a lot of dependencies of that package so they could start off with a reasonable minimum. That means Core, GUI, XML and Help. Core and XML are IIRC part of PR1.1.
The Following User Says Thank You to fatalsaint For This Useful Post: | ||
|
2010-02-08
, 00:52
|
Posts: 26 |
Thanked: 7 times |
Joined on Feb 2010
@ São Paulo - Brazil
|
#55
|
|
2010-02-08
, 00:56
|
Posts: 1,086 |
Thanked: 2,964 times |
Joined on Jan 2010
|
#56
|
|
2010-02-08
, 00:58
|
Posts: 3,428 |
Thanked: 2,856 times |
Joined on Jul 2008
|
#57
|
|
2010-02-08
, 01:07
|
Posts: 26 |
Thanked: 7 times |
Joined on Feb 2010
@ São Paulo - Brazil
|
#58
|
hmm.. you are using 2.6 and im using 2.5
Maybe you could try installing the 2.5 package to see if it helps?
apt-get install python2.5-qt4-gui
Edit: Scratch that, I don't think it would make any difference... hmm
Im afraid I dont know enough to help you out with this one..
If you just type "python" at the n900 terminal, do you get the python info returned? You might just need reinstall the pyqt package again...
|
2010-02-08
, 01:45
|
Posts: 3,428 |
Thanked: 2,856 times |
Joined on Jul 2008
|
#59
|
pyuic4 -o list_example_ui.py list_example.ui
#!/usr/bin/python2.5 import sys from PyQt4 import QtGui,QtCore from list_example_ui import * class MyForm(QtGui.QMainWindow): def __init__(self, parent=None): #build parent user interface QtGui.QWidget.__init__(self, parent) self.ui = Ui_MainWindow() self.ui.setupUi(self) if __name__ == "__main__": #This function means this was run directly, not called from another python file. app = QtGui.QApplication(sys.argv) myapp = MyForm() myapp.show() sys.exit(app.exec_())
class MyForm(QtGui.QMainWindow): def __init__(self, parent=None): #build parent user interface QtGui.QWidget.__init__(self, parent) self.ui = Ui_MainWindow() self.ui.setupUi(self) #connect buttons QtCore.QObject.connect(self.ui.btnAdd, QtCore.SIGNAL('clicked()'), self.doAdd) QtCore.QObject.connect(self.ui.btnAllAdd, QtCore.SIGNAL('clicked()'), self.doAllAdd) QtCore.QObject.connect(self.ui.btnRemove, QtCore.SIGNAL('clicked()'), self.doRemove) QtCore.QObject.connect(self.ui.btnAllRemove, QtCore.SIGNAL('clicked()'), self.doAllRemove) QtCore.QObject.connect(self.ui.btnAddNew, QtCore.SIGNAL('clicked()'), self.doAddNew) QtCore.QObject.connect(self.ui.actionQuit, QtCore.SIGNAL('triggered()'), QtGui.qApp, QtCore.SLOT('quit()'))
#Create Sub's def doAdd(self): add = 1 for i in range(self.ui.listRight.count()): #let's not create duplicates, so lets do a search. if self.ui.listRight.item(i).text() == self.ui.listLeft.currentItem().text(): add = 0 if add: #Okay, it wasn't found. Let's add it. self.ui.listRight.addItem(self.ui.listLeft.currentItem().text()) def doAllAdd(self): #This ones easy, just clear the right one, go through all the left items and add them. self.ui.listRight.clear() for i in range(self.ui.listLeft.count()): self.ui.listRight.addItem(self.ui.listLeft.item(i).text()) def doRemove(self): #Easy again, just remove the selected item. self.ui.listRight.takeItem(self.ui.listRight.currentRow()) def doAllRemove(self): #Super Easy. self.ui.listRight.clear() def doAddNew(self): #Pretty easy, just add to the left what is in the text box, then clear it out. self.ui.listLeft.addItem(self.ui.lineNew.text()) self.ui.lineNew.clear()
#!/usr/bin/python2.5 import sys from PyQt4 import QtGui,QtCore from list_example_ui import * class MyForm(QtGui.QMainWindow): def __init__(self, parent=None): #build parent user interface QtGui.QWidget.__init__(self, parent) self.ui = Ui_MainWindow() self.ui.setupUi(self) #connect buttons QtCore.QObject.connect(self.ui.btnAdd, QtCore.SIGNAL('clicked()'), self.doAdd) QtCore.QObject.connect(self.ui.btnAllAdd, QtCore.SIGNAL('clicked()'), self.doAllAdd) QtCore.QObject.connect(self.ui.btnRemove, QtCore.SIGNAL('clicked()'), self.doRemove) QtCore.QObject.connect(self.ui.btnAllRemove, QtCore.SIGNAL('clicked()'), self.doAllRemove) QtCore.QObject.connect(self.ui.btnAddNew, QtCore.SIGNAL('clicked()'), self.doAddNew) QtCore.QObject.connect(self.ui.actionQuit, QtCore.SIGNAL('triggered()'), QtGui.qApp, QtCore.SLOT('quit()')) #Create Sub's def doAdd(self): add = 1 for i in range(self.ui.listRight.count()): if self.ui.listRight.item(i).text() == self.ui.listLeft.currentItem().text(): add = 0 if add: self.ui.listRight.addItem(self.ui.listLeft.currentItem().text()) def doAllAdd(self): self.ui.listRight.clear() for i in range(self.ui.listLeft.count()): self.ui.listRight.addItem(self.ui.listLeft.item(i).text()) def doRemove(self): self.ui.listRight.takeItem(self.ui.listRight.currentRow()) def doAllRemove(self): self.ui.listRight.clear() def doAddNew(self): self.ui.listLeft.addItem(self.ui.lineNew.text()) self.ui.lineNew.clear() if __name__ == "__main__": app = QtGui.QApplication(sys.argv) myapp = MyForm() myapp.show() sys.exit(app.exec_())
The Following 42 Users Say Thank You to fatalsaint For This Useful Post: | ||
AlMehdi, Arcte, attila77, Berserk, born2wonder, candas1, ccarter, cfh11, dana.s, ejasmudar, El Amir, elimoon8, erniadeldesktop, ersanpermana, evad, fellew, giannoug, Helmuth, ingvay7, ioan, kojacker, Livinmalife, MaLKaV, mikec, noobmonkey, qwerty12, Red_uk, Ricardo, rpgAmazon, saned, SHARP66, sixwheeledbeast, slender, techno2001, Texrat, Tiboric, vdx29, vkv.raju, yerga, Zero Six |
|
2010-02-08
, 01:49
|
|
Posts: 11,700 |
Thanked: 10,045 times |
Joined on Jun 2006
@ North Texas, USA
|
#60
|
Last edited by kojacker; 2010-02-08 at 00:29.