From a805c1c34f422cfe3f3b2e10220406ef3c52c108 Mon Sep 17 00:00:00 2001 From: Kevin Krammer Date: Thu, 3 Oct 2013 16:57:29 +0200 Subject: [PATCH] Adding support for creating pixmaps from files --- lib/declarativewidgetsdocument.cpp | 2 ++ lib/lib.pro | 2 ++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/lib/declarativewidgetsdocument.cpp b/lib/declarativewidgetsdocument.cpp index 089ff28..a0ecea8 100644 --- a/lib/declarativewidgetsdocument.cpp +++ b/lib/declarativewidgetsdocument.cpp @@ -40,6 +40,7 @@ #include "declarativeitemviewextension_p.h" #include "declarativeloaderwidget_p.h" #include "declarativemessagebox_p.h" +#include "declarativepixmap_p.h" #include "declarativeseparator_p.h" #include "declarativestackedlayout_p.h" #include "declarativestatusbar_p.h" @@ -127,6 +128,7 @@ DeclarativeWidgetsDocument::DeclarativeWidgetsDocument(const QUrl &url, QObject qmlRegisterExtendedType("QtWidgets", 1, 0, "FileSystemModel"); qmlRegisterType("QtWidgets", 1, 0, "Icon"); qmlRegisterType(); + qmlRegisterType("QtWidgets", 1, 0, "Pixmap"); qmlRegisterExtendedType("QtWidgets", 1, 0, "Separator"); qmlRegisterExtendedType("QtCore", 1, 0, "StringListModel"); qmlRegisterType(); diff --git a/lib/lib.pro b/lib/lib.pro index 55fe924..b3d5737 100644 --- a/lib/lib.pro +++ b/lib/lib.pro @@ -28,6 +28,7 @@ HEADERS = \ declarativemessagebox_p.h \ declarativeobjectextension.h \ declarativeobjectproxy_p.h \ + declarativepixmap_p.h \ declarativeseparator_p.h \ declarativestackedlayout_p.h \ declarativestatusbar_p.h \ @@ -77,6 +78,7 @@ SOURCES = \ declarativelayoutextension.cpp \ declarativemessagebox.cpp \ declarativeobjectextension.cpp \ + declarativepixmap.cpp \ declarativeseparator.cpp \ declarativestackedlayout.cpp \ declarativestatusbar.cpp \ -- 1.7.2.5