add bulk files

This commit is contained in:
lazerpants 2016-03-18 17:21:45 +03:00
parent 7a04c5f45c
commit 473999a5a8
4 changed files with 106 additions and 0 deletions

16
main.cpp Normal file
View File

@ -0,0 +1,16 @@
#include "mainwindow.h"
#include <QApplication>
#include "style.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
Style *style = new Style;
a.setStyle(style);
MainWindow w;
w.show();
return a.exec();
}

29
mainwindow.cpp Normal file
View File

@ -0,0 +1,29 @@
#include <QVBoxLayout>
#include <QPushButton>
#include "mainwindow.h"
#include "flatbutton.h"
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
{
QVBoxLayout *layout = new QVBoxLayout;
QWidget *widget = new QWidget;
widget->setLayout(layout);
setCentralWidget(widget);
QPushButton *button1 = new QPushButton("Test #1");
layout->addWidget(button1);
FlatButton *flatButton = new FlatButton;
flatButton->setText("My button");
layout->addWidget(flatButton);
flatButton->setMinimumHeight(40);
QPushButton *button2 = new QPushButton("Test #2");
layout->addWidget(button2);
}
MainWindow::~MainWindow()
{
}

15
mainwindow.h Normal file
View File

@ -0,0 +1,15 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
};
#endif // MAINWINDOW_H

46
qt-material-widgets.pro Normal file
View File

@ -0,0 +1,46 @@
#-------------------------------------------------
#
# Project created by QtCreator 2016-03-18T11:23:14
#
#-------------------------------------------------
QT += core gui qml
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = qt-material-widgets
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp \
style.cpp \
appbar.cpp \
checkbox.cpp \
dialog.cpp \
flatbutton.cpp \
iconbutton.cpp \
iconmenu.cpp \
list.cpp \
radiobutton.cpp \
slider.cpp \
tab.cpp \
tabs.cpp \
textfield.cpp \
table.cpp
HEADERS += mainwindow.h \
style.h \
appbar.h \
checkbox.h \
dialog.h \
flatbutton.h \
iconbutton.h \
iconmenu.h \
list.h \
radiobutton.h \
slider.h \
tab.h \
tabs.h \
textfield.h \
table.h