|
2010-02-07
, 23:27
|
|
Posts: 3,203 |
Thanked: 1,391 times |
Joined on Nov 2009
@ Worthing, England
|
#42
|
The Following User Says Thank You to noobmonkey For This Useful Post: | ||
|
2010-02-07
, 23:32
|
Posts: 3,428 |
Thanked: 2,856 times |
Joined on Jul 2008
|
#43
|
wow.... indents ... evil things!!!
Figured out the code i need, but using wordpad..... keeps giving me indent errors! lol!
The Following User Says Thank You to fatalsaint For This Useful Post: | ||
|
2010-02-07
, 23:32
|
|
Posts: 3,203 |
Thanked: 1,391 times |
Joined on Nov 2009
@ Worthing, England
|
#44
|
import PyQt4 import sys from PyQt4 import QtGui from PyQt4 import QtCore class HelloWindow(QtGui.QMainWindow): def __init__(self, win_parent = None): #Init the base class QtGui.QMainWindow.__init__(self, win_parent) self.create_widgets() def create_widgets(self): #Widgets self.label = QtGui.QLabel("Say hello:") self.hello_edit = QtGui.QLineEdit() self.hello_button = QtGui.QPushButton("Push Me!") #connect signal QtCore.QObject.connect(self.hello_button , QtCore.SIGNAL("clicked()") , self.on_hello_clicked) #Horizontal layout h_box = QtGui.QHBoxLayout() h_box.addWidget(self.label) h_box.addWidget(self.hello_edit) h_box.addWidget(self.hello_button) #Create central widget, add layout and set central_widget = QtGui.QWidget() central_widget.setLayout(h_box) self.setCentralWidget(central_widget) def on_hello_clicked(self): QtGui.QMessageBox.information(self , "Hello!" , "Hello %s" % self.hello_edit.displayText() , QtGui.QMessageBox.Ok) if __name__ == "__main__": # Someone is launching this directly # Create the QApplication app = QtGui.QApplication(sys.argv) #The Main window main_window = HelloWindow() main_window.show() # Enter the main loop app.exec_()
The Following User Says Thank You to noobmonkey For This Useful Post: | ||
|
2010-02-07
, 23:45
|
Posts: 3,319 |
Thanked: 5,610 times |
Joined on Aug 2008
@ Finland
|
#45
|
"Could not open lock file /var/lib/dpkg/lock - open (13 permission denied) yadda yadda yadda... are you root?"
The Following 2 Users Say Thank You to attila77 For This Useful Post: | ||
|
2010-02-07
, 23:47
|
Posts: 3,428 |
Thanked: 2,856 times |
Joined on Jul 2008
|
#46
|
Hey, see post #2, you're overdoing it. Just install python2.5-qt4-doc from the application manager, no root/console funk needed.
The apt-get way of installing a basic PyQt is (sort of) officially deprecated, as then you would have to just through the same hoops to uninstall it. it's much cleaner to do via the App Manager.
PS. And if you don't happen see python2.5-qt4-doc/PyQt in the application manager, blame Extras testing procedures and wait ~24 hours (we're day 9 of the 10 day quarantine period).
|
2010-02-07
, 23:53
|
|
Posts: 11,700 |
Thanked: 10,045 times |
Joined on Jun 2006
@ North Texas, USA
|
#47
|
|
2010-02-07
, 23:56
|
|
Posts: 11,700 |
Thanked: 10,045 times |
Joined on Jun 2006
@ North Texas, USA
|
#48
|
this is my py file - i think my first steps have to be learning the layout of python, even before the code - seems simple enough at the moment though....
The Following User Says Thank You to Texrat For This Useful Post: | ||
|
2010-02-07
, 23:59
|
|
Posts: 3,203 |
Thanked: 1,391 times |
Joined on Nov 2009
@ Worthing, England
|
#49
|
What I like about Python is that it's so intuitive for a VB.Net programmer. I read through my books and everything makes quick and easy sense. Object orientation for the win!
|
2010-02-08
, 00:22
|
Posts: 3,319 |
Thanked: 5,610 times |
Joined on Aug 2008
@ Finland
|
#50
|
How many of python's bindings does that depend on? If all you need is qt4-gui why get all the rest? Waste of space. IMHO.
The Following 3 Users Say Thank You to attila77 For This Useful Post: | ||
Figured out the code i need, but using wordpad..... keeps giving me indent errors! lol!
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -