examples/tutorials/modelview/1_readonly/main.cpp
changeset 37 758a864f9613
parent 33 3e2da88830cd
equal deleted inserted replaced
36:ef0373b55136 37:758a864f9613
    39 ****************************************************************************/
    39 ****************************************************************************/
    40 
    40 
    41 //! [Quoting ModelView Tutorial]
    41 //! [Quoting ModelView Tutorial]
    42 // main.cpp
    42 // main.cpp
    43 #include <QtGui/QApplication>
    43 #include <QtGui/QApplication>
    44 #include "modelview.h"
    44 #include <QtGui/QTableView>
       
    45 #include "mymodel.h"
    45 
    46 
    46 int main(int argc, char *argv[])
    47 int main(int argc, char *argv[])
    47 {
    48 {
    48     QApplication a(argc, argv);
    49     QApplication a(argc, argv);
    49     ModelView w;
    50     QTableView tableView;
    50     w.show();
    51     MyModel myModel(0);
       
    52     tableView.setModel( &myModel );
       
    53     tableView.show();
    51     return a.exec();
    54     return a.exec();
    52 }
    55 }
    53 //! [Quoting ModelView Tutorial]
    56 //! [Quoting ModelView Tutorial]