From 970bbfe1434d0ce1d30e42dd09c6986224df380d Mon Sep 17 00:00:00 2001 From: lordwelch Date: Fri, 19 Feb 2016 15:20:15 -0800 Subject: [PATCH] start adding way to load images --- main.go | 2 +- main.qml | 3 ++- qml/fileDialogs.qml | 13 +++++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 qml/fileDialogs.qml diff --git a/main.go b/main.go index de50aed..2919e96 100644 --- a/main.go +++ b/main.go @@ -17,7 +17,7 @@ import ( type cell struct { text string - img image.RGBA + img imagick.Image qmlcell qml.Object index int } diff --git a/main.qml b/main.qml index 80e73d1..a9e34c4 100644 --- a/main.qml +++ b/main.qml @@ -1,4 +1,5 @@ import QtQuick 2.4 +import QtQuick.Dialogs 1.2 import QtQuick.Controls 1.3 import QtQuick.Window 2.0 import "qml" @@ -15,7 +16,7 @@ ApplicationWindow { property bool cls: false onClosing: if (!cls) { - // close.accepted = false + close.accepted = false } AboutDialog { diff --git a/qml/fileDialogs.qml b/qml/fileDialogs.qml new file mode 100644 index 0000000..a725a8b --- /dev/null +++ b/qml/fileDialogs.qml @@ -0,0 +1,13 @@ +import QtQuick 2.2 +import QtQuick.Dialogs 1.0 + +FileDialog { + id: imgDialog + title: "Please choose an image" + folder: shortcuts.home + onAccepted: { + } + onRejected: { + } + Component.onCompleted: visible = true +}