summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnne Jan Brouwer <brouwer@annejan.com>2014-07-30 22:31:35 +0200
committerAnne Jan Brouwer <ajbrouwer@totalactivemedia.nl>2014-07-30 22:31:35 +0200
commitc2eb3dff58e4de577f6c250ad225d42f762b6c26 (patch)
treef758e25ee26cc4dd6735cf098dd1150d272f7965
initial import
-rw-r--r--.gitignore1
-rw-r--r--main.cpp27
-rw-r--r--mainwindow.cpp14
-rw-r--r--mainwindow.h22
-rw-r--r--mainwindow.ui56
-rw-r--r--qtpass.pro20
6 files changed, 140 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..8fd185df
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+qtpass.pro.user
diff --git a/main.cpp b/main.cpp
new file mode 100644
index 00000000..86e2c697
--- /dev/null
+++ b/main.cpp
@@ -0,0 +1,27 @@
+#include "mainwindow.h"
+#include <QApplication>
+#include <QFileSystemModel>
+#include <QTreeView>
+
+int main(int argc, char *argv[])
+{
+ QApplication a(argc, argv);
+ MainWindow w;
+ w.show();
+
+ QFileSystemModel model;
+ model.setRootPath(QDir::homePath());
+ QTreeView tree;
+ tree.setModel(&model);
+
+ // Demonstrating look and feel features
+ tree.setAnimated(false);
+ tree.setIndentation(20);
+ tree.setSortingEnabled(true);
+
+ tree.setWindowTitle(QObject::tr("Dir View"));
+ tree.resize(640, 480);
+ tree.show();
+
+ return a.exec();
+}
diff --git a/mainwindow.cpp b/mainwindow.cpp
new file mode 100644
index 00000000..49d64fce
--- /dev/null
+++ b/mainwindow.cpp
@@ -0,0 +1,14 @@
+#include "mainwindow.h"
+#include "ui_mainwindow.h"
+
+MainWindow::MainWindow(QWidget *parent) :
+ QMainWindow(parent),
+ ui(new Ui::MainWindow)
+{
+ ui->setupUi(this);
+}
+
+MainWindow::~MainWindow()
+{
+ delete ui;
+}
diff --git a/mainwindow.h b/mainwindow.h
new file mode 100644
index 00000000..a3948a91
--- /dev/null
+++ b/mainwindow.h
@@ -0,0 +1,22 @@
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+namespace Ui {
+class MainWindow;
+}
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ explicit MainWindow(QWidget *parent = 0);
+ ~MainWindow();
+
+private:
+ Ui::MainWindow *ui;
+};
+
+#endif // MAINWINDOW_H
diff --git a/mainwindow.ui b/mainwindow.ui
new file mode 100644
index 00000000..798394ea
--- /dev/null
+++ b/mainwindow.ui
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>400</width>
+ <height>300</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>MainWindow</string>
+ </property>
+ <widget class="QWidget" name="centralWidget">
+ <widget class="QTreeWidget" name="treeWidget">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>10</y>
+ <width>256</width>
+ <height>211</height>
+ </rect>
+ </property>
+ <column>
+ <property name="text">
+ <string notr="true">1</string>
+ </property>
+ </column>
+ </widget>
+ </widget>
+ <widget class="QMenuBar" name="menuBar">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>400</width>
+ <height>22</height>
+ </rect>
+ </property>
+ </widget>
+ <widget class="QToolBar" name="mainToolBar">
+ <attribute name="toolBarArea">
+ <enum>TopToolBarArea</enum>
+ </attribute>
+ <attribute name="toolBarBreak">
+ <bool>false</bool>
+ </attribute>
+ </widget>
+ <widget class="QStatusBar" name="statusBar"/>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/qtpass.pro b/qtpass.pro
new file mode 100644
index 00000000..2e7c1b87
--- /dev/null
+++ b/qtpass.pro
@@ -0,0 +1,20 @@
+#-------------------------------------------------
+#
+# Project created by QtCreator 2014-07-30T21:56:15
+#
+#-------------------------------------------------
+
+QT += core gui
+
+greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
+
+TARGET = qtpass
+TEMPLATE = app
+
+
+SOURCES += main.cpp\
+ mainwindow.cpp
+
+HEADERS += mainwindow.h
+
+FORMS += mainwindow.ui