Commit 1561f4fc authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Allow to load a qml here

parent 53fcb75e
......@@ -19,14 +19,21 @@
#include "addressbookquickwidget.h"
#include <QUrl>
AddressBookQuickWidget::AddressBookQuickWidget(QWidget *parent)
: QQuickWidget(parent)
{
resize(400, 500);
setResizeMode(QQuickWidget::SizeRootObjectToView);
}
AddressBookQuickWidget::~AddressBookQuickWidget()
{
}
void AddressBookQuickWidget::loadQmlFile(const QString &qmlFilePath)
{
setSource(QUrl(qmlFilePath));
}
......@@ -29,6 +29,8 @@ class AddressBookQuickWidget : public QQuickWidget
public:
explicit AddressBookQuickWidget(QWidget *parent = Q_NULLPTR);
~AddressBookQuickWidget();
void loadQmlFile(const QString &qmlFilePath);
};
#endif // ADDRESSBOOKQUICKWIDGET_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment