From: Tobias Koenig Date: Sun, 28 Oct 2012 07:15:30 +0000 (+0100) Subject: Add support for GroupBox X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=d7a26a565b416b162b55d04641403bbb6195363e;p=konrad%2FDeclarativeWidgets.git Add support for GroupBox --- diff --git a/declarativeobjects.cpp b/declarativeobjects.cpp index 74fa375..5ae5873 100644 --- a/declarativeobjects.cpp +++ b/declarativeobjects.cpp @@ -882,6 +882,14 @@ DeclarativeFrame::DeclarativeFrame(QObject *parent) : DeclarativeWidgetProxy(parent) +{ + connectAllSignals(m_proxiedObject, this); +} + +CUSTOM_METAOBJECT(DeclarativeGroupBox, QGroupBox) + // DeclarativeInputDialog DeclarativeInputDialogAttached::DeclarativeInputDialogAttached(QObject *parent) : QObject(parent) { diff --git a/declarativeobjects_p.h b/declarativeobjects_p.h index b7b098c..030386b 100644 --- a/declarativeobjects_p.h +++ b/declarativeobjects_p.h @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -541,6 +542,14 @@ class DeclarativeFrame : public DeclarativeWidgetProxy DeclarativeFrame(QObject *parent = 0); }; +class DeclarativeGroupBox : public DeclarativeWidgetProxy +{ + DECLARATIVE_OBJECT + + public: + DeclarativeGroupBox(QObject *parent = 0); +}; + class DeclarativeInputDialogAttached : public QObject { Q_OBJECT diff --git a/declarativewidgetdocument.cpp b/declarativewidgetdocument.cpp index 026904a..315cafc 100644 --- a/declarativewidgetdocument.cpp +++ b/declarativewidgetdocument.cpp @@ -55,6 +55,7 @@ DeclarativeWidgetDocument::DeclarativeWidgetDocument(const QUrl &url, QObject *p qmlRegisterType("QtGui", 1, 0, "FileDialog"); qmlRegisterType("QtGui", 1, 0, "FontDialog"); qmlRegisterType("QtGui", 1, 0, "Frame"); + qmlRegisterType("QtGui", 1, 0, "GroupBox"); qmlRegisterType(); qmlRegisterType("QtGui", 1, 0, "InputDialog"); qmlRegisterType("QtGui", 1, 0, "Label"); diff --git a/gallery.qml b/gallery.qml index 77a91a2..ecf19b7 100644 --- a/gallery.qml +++ b/gallery.qml @@ -13,5 +13,10 @@ Widget { minimumWidth: 100 minimumHeight: 100 } + GroupBox { + title: qsTr("Hello World") + minimumWidth: 100 + minimumHeight: 100 + } } } diff --git a/qwidgets.list b/qwidgets.list index be37b09..8a7c613 100644 --- a/qwidgets.list +++ b/qwidgets.list @@ -18,7 +18,6 @@ qfocusframe.h qfontcombobox.h qgraphicsview.h qgraphicswidget.h -qgroupbox.h qheaderview.h qlcdnumber.h qlistview.h