From 750554a55a5fd13538b61dd1d7ba4a0ee43c7778 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kjist=C3=B3f?= Date: Sun, 4 Dec 2016 20:29:47 +0100 Subject: [PATCH] started working on GUI in Qt5 --- chat_window.hpp | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 chat_window.hpp diff --git a/chat_window.hpp b/chat_window.hpp new file mode 100644 index 0000000..fd92cbf --- /dev/null +++ b/chat_window.hpp @@ -0,0 +1,41 @@ +#pragma once +#include +#include +#include +#include + + + +class chat_window : public QWidget +{ + Q_OBJECT + +public: + explicit chat_window(QWidget* parent = 0) + :QWidget(parent) + { setupUi(); } + +private: + QGridLayout* _layout; + QListWidget* _chat; + QListWidget* _people; + QLineEdit* _msg; + + void setupUi() + { + this->setWindowTitle("C++11Chat"); + this->setMinimumSize(1000, 500); + _layout = new QGridLayout(); + + _chat = new QListWidget(); + _people = new QListWidget(); + + _msg = new QLineEdit(); + + _layout->addWidget(_chat, 0, 0, 1, 1); + _layout->addWidget(_people, 0, 1, 1, 2); + _layout->addWidget(_msg, 1, 0, 1, 3); + + this->setLayout(_layout); + } +}; \ No newline at end of file