[PySide] DataMapper issues
Adrian Klaver
adrian.klaver at gmail.com
Mon Feb 18 04:55:37 CET 2013
On 02/17/2013 07:28 PM, Srini Kommoori wrote:
> For any Qt App, QtGui.QApplication is a main event loop. Every gui app
> needs one QtGui.QApplication.
>
> There could be muliple View/UI elements depending on developers wish.
> 1. QWidget/QMainWindow
> 2. QWebkit
> 3. QGraphicsView
> 4. QDeclarativeView
>
> You can keep changing the views depending on the app requirements.
>
> Hope that helps.
Yes, but what I do not understand is in the following sequence;
if __name__ == '__main__':
import sys
app = QtGui.QApplication(sys.argv)
if not connection.createConnection():
sys.exit(1)
model = QtSql.QSqlTableModel()
initializeModel(model)
view1 = createView("Table Model (View 1)", model)
view2 = createView("Table Model (View 2)", model)
view1.show()
view2.move(view1.x() + view1.width() + 20, view1.y())
view2.show()
sys.exit(app.exec_())
Once app is instantiated how are view1 and view2 hooked into it without
there being an explicit link?
>
> -Srini
>
--
Adrian Klaver
adrian.klaver at gmail.com
More information about the PySide
mailing list