QtHPConnect/hp_mdiwindow.cpp

31 lines
554 B
C++
Raw Normal View History

2019-02-10 15:32:15 +02:00
#include "hp_mdiwindow.h"
2019-02-10 15:43:00 +02:00
hp_MdiWindow::hp_MdiWindow(QWidget * parent)
:QMdiSubWindow(parent)
2019-02-10 15:32:15 +02:00
{
2019-02-10 15:43:00 +02:00
setMinimumSize(400,400);
setMaximumSize(1000,1000);
setSizePolicy(QSizePolicy::Ignored,QSizePolicy::Ignored);
setup();
}
void hp_MdiWindow::setup() {
textEdit = new QTextEdit(this);
setWidget(textEdit);
}
QTextEdit * hp_MdiWindow::getEditor() {
return textEdit;
}
void hp_MdiWindow::show() {
textEdit->show();
QMdiSubWindow::show();
}
2019-02-10 15:32:15 +02:00
2019-02-10 15:43:00 +02:00
hp_MdiWindow::~hp_MdiWindow() {
if (textEdit)
delete textEdit;
2019-02-10 15:32:15 +02:00
}