From 3006338f95c21a9ac28386e1384dcf850549d54f Mon Sep 17 00:00:00 2001
From: tobiglaser <76131623+tobiglaser@users.noreply.github.com>
Date: Sun, 15 May 2022 22:26:02 +0200
Subject: [PATCH] configure T2C view

---
 Text2Console/mainwindow.cpp | 18 ++++++++++++++++++
 Text2Console/mainwindow.h   |  5 +++++
 2 files changed, 23 insertions(+)

diff --git a/Text2Console/mainwindow.cpp b/Text2Console/mainwindow.cpp
index 47b43a3..58be736 100644
--- a/Text2Console/mainwindow.cpp
+++ b/Text2Console/mainwindow.cpp
@@ -1,8 +1,26 @@
+#include <QBoxLayout>
+
 #include "mainwindow.h"
 
 MainWindow::MainWindow(QWidget *parent)
     : QMainWindow(parent)
 {
+//general
+    setWindowTitle("text2Console");
+
+// Layout
+    QBoxLayout *layout = new QBoxLayout(QBoxLayout::Direction::LeftToRight);
+    QWidget *widget = new QWidget;
+    widget->setLayout(layout);
+    this->setCentralWidget(widget); // special for MainWindow
+
+// LineEdit
+    lineEdit = new QLineEdit();
+    layout->addWidget(lineEdit);
+
+// Button
+    this->button = new QPushButton("Print");
+    layout->addWidget(button);
 }
 
 MainWindow::~MainWindow()
diff --git a/Text2Console/mainwindow.h b/Text2Console/mainwindow.h
index d147190..50f7c09 100644
--- a/Text2Console/mainwindow.h
+++ b/Text2Console/mainwindow.h
@@ -2,12 +2,17 @@
 #define MAINWINDOW_H
 
 #include <QMainWindow>
+#include <QPushButton>
+#include <QLineEdit>
 
 class MainWindow : public QMainWindow
 {
     Q_OBJECT
 
 public:
+    QPushButton *button;
+    QLineEdit *lineEdit;
+
     MainWindow(QWidget *parent = nullptr);
     ~MainWindow();
 };
-- 
GitLab