diff options
-rw-r--r-- | main.cpp | 4 | ||||
-rw-r--r-- | main_view.qml | 12 | ||||
-rw-r--r-- | pm.pro | 2 |
3 files changed, 14 insertions, 4 deletions
@@ -1,7 +1,7 @@ #include <cmath> #include <memory> #include <QSurfaceFormat> -#include <QGuiApplication> +#include <QApplication> #include <QQmlApplicationEngine> #include "mp.h" @@ -10,7 +10,7 @@ int main(int argc, char **argv) { - QGuiApplication app(argc, argv); + QApplication app(argc, argv); qmlRegisterType<Scatterplot>("PM", 1, 0, "Scatterplot"); diff --git a/main_view.qml b/main_view.qml index 4a093f2..5d86c36 100644 --- a/main_view.qml +++ b/main_view.qml @@ -1,8 +1,10 @@ import QtQuick 2.0 import QtQuick.Controls 1.3 +import QtQuick.Dialogs 1.2 import PM 1.0 ApplicationWindow { + title: "Projection Manipulation" visible: true width: 1200 height: 600 @@ -59,6 +61,14 @@ ApplicationWindow { } } + FileDialog { + id: fileDialog + title: "Choose a file..." + onAccepted: { + // datasetLoader.load(fileDialog.fileUrls) + } + } + Action { id: quitAction text: "&Quit" @@ -70,7 +80,7 @@ ApplicationWindow { id: openAction text: "&Open..." shortcut: "Ctrl+O" - onTriggered: console.log("Open file") + onTriggered: fileDialog.open() } Action { @@ -1,4 +1,4 @@ -QT += qml quick +QT += qml quick widgets QMAKE_CXXFLAGS += -std=c++11 QMAKE_LIBS += -larmadillo |