1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| #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; }
|