#include <QtGui> #include "splitereditor.h" #include "ui_splitereditor.h" SpliterEditor::SpliterEditor(QWidget *parent) : QWidget(parent), ui(new Ui::SpliterEditor) { ui->setupUi(this); splitter = new QSplitter(Qt::Horizontal); editor1 = new QTextEdit; editor2 = new QTextEdit; editor3 = new QTextEdit; splitter->addWidget(editor1); splitter->addWidget(editor2); splitter->addWidget(editor3); editor1->setPlainText("Killua"); editor2->setPlainText("KK"); editor3->setPlainText("Hello World"); splitter->show(); } SpliterEditor::~SpliterEditor() { delete ui; }
|