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
[email protected]
_______________________________________________
PySide mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/pyside

Reply via email to