started working on GUI in Qt5
This commit is contained in:
parent
08365c0471
commit
750554a55a
41
chat_window.hpp
Normal file
41
chat_window.hpp
Normal file
@ -0,0 +1,41 @@
|
||||
#pragma once
|
||||
#include <QWidget>
|
||||
#include <QGridLayout>
|
||||
#include <QLineEdit>
|
||||
#include <QListWidget>
|
||||
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue
Block a user