initial qt5 main window

allow_new_sellers
Martin Brodbeck 4 years ago
parent 68448bd4d9
commit ace6d29f2b
  1. 16
      src/gui/CMakeLists.txt
  2. 16
      src/gui/kima2.cpp
  3. 6
      src/gui/mainwindow.cpp
  4. 18
      src/gui/mainwindow.h
  5. 31
      src/gui/mainwindow.ui

@ -1,10 +1,18 @@
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed
set(CMAKE_AUTOMOC ON)
# Create code from a list of Qt designer ui files
set(CMAKE_AUTOUIC ON)
# Find the QtWidgets library
find_package(Qt5Widgets CONFIG REQUIRED)
set(GUI_HEADERS
)
set(GUI_SOURCES
kima2.cpp
mainwindow.cpp
mainwindow.ui
)
add_executable(kima2 ${GUI_SOURCES})
target_link_libraries(kima2 core)
target_link_libraries(kima2 core Qt5::Widgets)

@ -1,10 +1,16 @@
#include "../core/entity.h"
#include "mainwindow.h"
#include <iostream>
#include <boost/uuid/uuid_io.hpp>
#include <QApplication>
int main()
int main(int argc, char* argv[])
{
//Q_INIT_RESOURCE(application);
QApplication kimaApp{argc, argv};
MainWindow mainWin{};
mainWin.show();
return 0;
return kimaApp.exec();
}

@ -0,0 +1,6 @@
#include "mainwindow.h"
MainWindow::MainWindow()
{
ui.setupUi(this);
}

@ -0,0 +1,18 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include "ui_mainwindow.h"
#include <QMainWindow>
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow();
private:
Ui::MainWindow ui;
};
#endif

@ -0,0 +1,31 @@
<?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>800</width>
<height>600</height>
</rect>
</property>
<property name="windowTitle">
<string>KIMA2</string>
</property>
<widget class="QWidget" name="centralwidget"/>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>24</height>
</rect>
</property>
</widget>
<widget class="QStatusBar" name="statusbar"/>
</widget>
<resources/>
<connections/>
</ui>
Loading…
Cancel
Save