diff options
Diffstat (limited to 'examples')
8 files changed, 10 insertions, 8 deletions
diff --git a/examples/tutorials/modelview/1_readonly/modelview.h b/examples/tutorials/modelview/1_readonly/modelview.h index 9307083..cc14d90 100755 --- a/examples/tutorials/modelview/1_readonly/modelview.h +++ b/examples/tutorials/modelview/1_readonly/modelview.h @@ -45,7 +45,7 @@ // modelview.h #include <QtGui/QMainWindow> -class QTableView; //forward declaration +QT_FORWARD_DECLARE_CLASS(QTableView) class ModelView : public QMainWindow { diff --git a/examples/tutorials/modelview/2_formatting/modelview.h b/examples/tutorials/modelview/2_formatting/modelview.h index 7291487..b2943ac 100755 --- a/examples/tutorials/modelview/2_formatting/modelview.h +++ b/examples/tutorials/modelview/2_formatting/modelview.h @@ -43,7 +43,7 @@ #include <QtGui/QMainWindow> -class QTableView; //forward declaration +QT_FORWARD_DECLARE_CLASS(QTableView) class ModelView : public QMainWindow { diff --git a/examples/tutorials/modelview/3_changingmodel/modelview.h b/examples/tutorials/modelview/3_changingmodel/modelview.h index 7291487..b2943ac 100755 --- a/examples/tutorials/modelview/3_changingmodel/modelview.h +++ b/examples/tutorials/modelview/3_changingmodel/modelview.h @@ -43,7 +43,7 @@ #include <QtGui/QMainWindow> -class QTableView; //forward declaration +QT_FORWARD_DECLARE_CLASS(QTableView) class ModelView : public QMainWindow { diff --git a/examples/tutorials/modelview/3_changingmodel/mymodel.h b/examples/tutorials/modelview/3_changingmodel/mymodel.h index 47b026e..01ad88d 100755 --- a/examples/tutorials/modelview/3_changingmodel/mymodel.h +++ b/examples/tutorials/modelview/3_changingmodel/mymodel.h @@ -43,7 +43,7 @@ #include <QAbstractTableModel> -class QTimer; // forward declaration +QT_FORWARD_DECLARE_CLASS(QTimer) class MyModel : public QAbstractTableModel { diff --git a/examples/tutorials/modelview/4_headers/modelview.h b/examples/tutorials/modelview/4_headers/modelview.h index 7669e35..03f99c0 100755 --- a/examples/tutorials/modelview/4_headers/modelview.h +++ b/examples/tutorials/modelview/4_headers/modelview.h @@ -43,7 +43,7 @@ #include <QtGui/QMainWindow> -class QTableView; //forward declaration +QT_FORWARD_DECLARE_CLASS(QTableView) class ModelView : public QMainWindow { diff --git a/examples/tutorials/modelview/5_edit/modelview.h b/examples/tutorials/modelview/5_edit/modelview.h index 97c840c..069107b 100755 --- a/examples/tutorials/modelview/5_edit/modelview.h +++ b/examples/tutorials/modelview/5_edit/modelview.h @@ -43,7 +43,7 @@ #include <QtGui/QMainWindow> -class QTableView; //forward declaration +QT_FORWARD_DECLARE_CLASS(QTableView) class ModelView : public QMainWindow { diff --git a/examples/tutorials/modelview/6_treeview/modelview.h b/examples/tutorials/modelview/6_treeview/modelview.h index a47111c..55f3470 100755 --- a/examples/tutorials/modelview/6_treeview/modelview.h +++ b/examples/tutorials/modelview/6_treeview/modelview.h @@ -43,10 +43,11 @@ #include <QtGui/QMainWindow> +QT_BEGIN_NAMESPACE class QTreeView; //forward declaration class QStandardItemModel; class QStandardItem; - +QT_END_NAMESPACE class ModelView : public QMainWindow { diff --git a/examples/tutorials/modelview/7_selections/modelview.h b/examples/tutorials/modelview/7_selections/modelview.h index 5229ac3..d20797e 100755 --- a/examples/tutorials/modelview/7_selections/modelview.h +++ b/examples/tutorials/modelview/7_selections/modelview.h @@ -43,10 +43,11 @@ #include <QtGui/QMainWindow> +QT_BEGIN_NAMESPACE class QTreeView; //forward declaration class QStandardItemModel; class QItemSelection; - +QT_END_NAMESPACE class ModelView : public QMainWindow { |