-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
de0b5dd
commit 9aa223a
Showing
6 changed files
with
377 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#include "mainwindow.h" | ||
#include <QApplication> | ||
#include <QTextEdit> | ||
#include <QSplitter> | ||
|
||
int main(int argc, char *argv[]) | ||
{ | ||
QApplication a(argc, argv); | ||
|
||
QTextEdit *editor1 = new QTextEdit; | ||
QTextEdit *editor2 = new QTextEdit; | ||
QTextEdit *editor3 = new QTextEdit; | ||
|
||
QSplitter splitter(Qt::Horizontal); | ||
splitter.addWidget(editor1); | ||
splitter.addWidget(editor2); | ||
splitter.addWidget(editor3); | ||
|
||
editor1->setPlainText("Mon enfant, ma soeur,\n" | ||
"Songe la douceur\n" | ||
"D'aller l-bas vivre ensemble,\n" | ||
"Aimer loisir,\n" | ||
"Aimer et mourir\n" | ||
"Au pays qui te ressemble."); | ||
editor2->setPlainText("My child, my sister,\n" | ||
"think of the sweetness\n" | ||
"of going there to live together!\n" | ||
"To love at leisure,\n" | ||
"to love and to die\n" | ||
"in a country that is the image of you!"); | ||
editor3->setPlainText("Mein Kind, meine Schwester,\n" | ||
"denke an den Traum\n" | ||
"dort hin(unter) zu gehen um zusammen\n" | ||
"zu leben und in aller Ruhe zu lieben,\n" | ||
"Zu lieben und zu sterben\n" | ||
"in dem Land, das dir gleicht."); | ||
|
||
splitter.setWindowTitle(QObject::tr("Splitter")); | ||
splitter.show(); | ||
|
||
return a.exec(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#include "mainwindow.h" | ||
#include "ui_mainwindow.h" | ||
|
||
MainWindow::MainWindow(QWidget *parent) : | ||
QMainWindow(parent), | ||
ui(new Ui::MainWindow) | ||
{ | ||
ui->setupUi(this); | ||
} | ||
|
||
MainWindow::~MainWindow() | ||
{ | ||
delete ui; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#ifndef MAINWINDOW_H | ||
#define MAINWINDOW_H | ||
|
||
#include <QMainWindow> | ||
|
||
namespace Ui { | ||
class MainWindow; | ||
} | ||
|
||
class MainWindow : public QMainWindow | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
explicit MainWindow(QWidget *parent = 0); | ||
~MainWindow(); | ||
|
||
private: | ||
Ui::MainWindow *ui; | ||
}; | ||
|
||
#endif // MAINWINDOW_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<ui version="4.0"> | ||
<class>MainWindow</class> | ||
<widget class="QMainWindow" name="MainWindow" > | ||
<property name="geometry" > | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>400</width> | ||
<height>300</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle" > | ||
<string>MainWindow</string> | ||
</property> | ||
<widget class="QMenuBar" name="menuBar" /> | ||
<widget class="QToolBar" name="mainToolBar" /> | ||
<widget class="QWidget" name="centralWidget" /> | ||
<widget class="QStatusBar" name="statusBar" /> | ||
</widget> | ||
<layoutDefault spacing="6" margin="11" /> | ||
<pixmapfunction></pixmapfunction> | ||
<resources/> | ||
<connections/> | ||
</ui> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#------------------------------------------------- | ||
# | ||
# Project created by QtCreator 2014-11-16T12:52:26 | ||
# | ||
#------------------------------------------------- | ||
|
||
QT += core gui | ||
|
||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets | ||
|
||
TARGET = splitter | ||
TEMPLATE = app | ||
|
||
|
||
SOURCES += main.cpp\ | ||
mainwindow.cpp | ||
|
||
HEADERS += mainwindow.h | ||
|
||
FORMS += mainwindow.ui |
Oops, something went wrong.