Register QHeaderView as an uncreatable type for now
authorKevin Krammer <kevin.krammer@kdab.com>
Fri, 29 Mar 2013 13:34:01 +0000 (14:34 +0100)
committerKevin Krammer <kevin.krammer@kdab.com>
Fri, 29 Mar 2013 13:50:49 +0000 (14:50 +0100)
QHeaderView requires constructor arguments (orientation) so it is not
easily creatable and the argument is also not easily deducable
during runtime.

lib/declarativewidgetsdocument.cpp

index e261ca4..b13ac75 100644 (file)
@@ -72,6 +72,7 @@
 #include <QDoubleSpinBox>
 #include <QFileSystemModel>
 #include <QGroupBox>
+#include <QHeaderView>
 #include <QLabel>
 #include <QLCDNumber>
 #include <QListView>
@@ -153,6 +154,7 @@ DeclarativeWidgetsDocument::DeclarativeWidgetsDocument(const QUrl &url, QObject
   qmlRegisterExtendedType<DeclarativeFontDialog, DeclarativeWidgetExtension>("QtGui", 1, 0, "FontDialog");
   qmlRegisterExtendedType<QGroupBox, DeclarativeWidgetExtension>("QtGui", 1, 0, "GroupBox");
   qmlRegisterExtendedType<DeclarativeInputDialog, DeclarativeWidgetExtension>("QtGui", 1, 0, "InputDialog");
+  qmlRegisterUncreatableType<QHeaderView>("QtGui", 1, 0, "HeaderView", "");
   qmlRegisterExtendedType<QLabel, DeclarativeWidgetExtension>("QtGui", 1, 0, "Label");
   qmlRegisterExtendedType<QLineEdit, DeclarativeWidgetExtension>("QtGui", 1, 0, "LineEdit");
   qmlRegisterExtendedType<QLCDNumber, DeclarativeWidgetExtension>("QtGui", 1, 0, "LCDNumber");