|
2008-11-20
, 20:47
|
Posts: 113 |
Thanked: 13 times |
Joined on Nov 2008
@ Darmstadt, Germany
|
#22
|
import sys from PyQt4 import QtCore, QtGui class SlmListView( QtGui.QWidget ): def __init( self, parent = None, core = None ): QtGui.QWidget.__init__( self, parent ) self.myLayout = QtGui.QVBoxLayout() self.setLayout( self.myLayout ) def populate( self ): for i in [1, 2, 3]: self.myLayout.addWidget( QtGui.QPushButton( str( i ) ) ) class SlmMainView( QtGui.QMainWindow ): def __init__( self, parent = None ): QtGui.QWidget.__init__( self, parent ) self.slmListView = SlmListView() self.slmListView.populate() self.setCentralWidget( self.slmListView ) if __name__ == "__main__": app = QtGui.QApplication( sys.argv ) slmMainView = SlmMainView() slmMainView.show() sys.exit( app.exec_() )
C:\develop\Python>python app.py Traceback (most recent call last): File "app.py", line 26, in <module> slmMainView = SlmMainView() File "app.py", line 20, in __init__ self.slmListView.populate() File "app.py", line 12, in populate self.myLayout.addWidget( QtGui.QPushButton( str( i ) ) ) AttributeError: myLayout
|
2008-11-21
, 22:57
|
|
Posts: 92 |
Thanked: 50 times |
Joined on Jan 2006
@ the praeternatural tower
|
#23
|
|
2008-11-22
, 01:47
|
|
Posts: 92 |
Thanked: 50 times |
Joined on Jan 2006
@ the praeternatural tower
|
#24
|
def __init( self, parent = None, core = None ):
def __init__( self, parent = None, core = None ):
|
2008-11-22
, 12:32
|
Posts: 113 |
Thanked: 13 times |
Joined on Nov 2008
@ Darmstadt, Germany
|
#25
|
|
2008-11-23
, 01:25
|
|
Posts: 92 |
Thanked: 50 times |
Joined on Jan 2006
@ the praeternatural tower
|
#26
|
|
2009-01-08
, 15:21
|
Posts: 46 |
Thanked: 0 times |
Joined on Dec 2008
@ Grenoble (France)
|
#27
|
|
2009-07-02
, 04:33
|
|
Posts: 415 |
Thanked: 193 times |
Joined on Jun 2009
@ A place with no mountains
|
#28
|
|
2009-08-26
, 17:55
|
Posts: 6 |
Thanked: 0 times |
Joined on Aug 2009
|
#29
|
|
2009-08-26
, 18:21
|
Posts: 3,319 |
Thanked: 5,610 times |
Joined on Aug 2008
@ Finland
|
#30
|
@Nyrath:
The flickr-pics only show the application in windowed mode. Do you know if there's support for the hardware keys and fullscreen integrated?