parent
3d4aad9e0d
commit
eea5b961fd
6 changed files with 85 additions and 2 deletions
@ -0,0 +1,11 @@ |
||||
#include <QApplication> |
||||
#include "mainWindow.h" |
||||
|
||||
int main(int argc, char **argv) { |
||||
QApplication app(argc, argv); |
||||
MainWindow *win = new MainWindow(); |
||||
win->setWindowTitle("Button demo app"); |
||||
win->show(); |
||||
|
||||
return app.exec(); |
||||
} |
@ -0,0 +1,8 @@ |
||||
#include "mainWindow.h" |
||||
|
||||
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { |
||||
setupUi(this); |
||||
} |
||||
|
||||
MainWindow::~MainWindow() { |
||||
} |
@ -0,0 +1,14 @@ |
||||
#include <QMainWindow> |
||||
#include "ui_mainWindow.h" |
||||
|
||||
class NotificationModel; |
||||
|
||||
class MainWindow : public QMainWindow, private Ui_MainWindow { |
||||
Q_OBJECT |
||||
|
||||
public: |
||||
MainWindow(QWidget *parent=nullptr); |
||||
~MainWindow(); |
||||
|
||||
private: |
||||
}; |
@ -0,0 +1,34 @@ |
||||
<?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>270</width> |
||||
<height>115</height> |
||||
</rect> |
||||
</property> |
||||
<property name="windowTitle"> |
||||
<string>MainWindow</string> |
||||
</property> |
||||
<widget class="QWidget" name="centralwidget"> |
||||
<widget class="QPushButton" name="pushButton"> |
||||
<property name="geometry"> |
||||
<rect> |
||||
<x>10</x> |
||||
<y>10</y> |
||||
<width>241</width> |
||||
<height>91</height> |
||||
</rect> |
||||
</property> |
||||
<property name="text"> |
||||
<string>I am a button</string> |
||||
</property> |
||||
</widget> |
||||
</widget> |
||||
</widget> |
||||
<resources/> |
||||
<connections/> |
||||
</ui> |
@ -0,0 +1,12 @@ |
||||
project('qt5 build test', 'cxx') |
||||
|
||||
qt5dep = find_dep('qt5', modules : 'Widgets', required : true) |
||||
|
||||
q5exe = executable('qt5test', |
||||
sources : ['main.cpp', 'mainWindow.cpp'], |
||||
moc_headers : ['mainWindow.h'], |
||||
ui_files : 'mainWindow.ui', |
||||
deps : qt5dep\ |
||||
) |
||||
|
||||
add_test('qt5test', q5exe) |
Loading…
Reference in new issue