32 lines
603 B
C++
32 lines
603 B
C++
|
|
#include "propertyDialog.h"
|
||
|
|
#include <QVBoxLayout>
|
||
|
|
#include <QKeyEvent>
|
||
|
|
|
||
|
|
PropertyDlg::PropertyDlg(QWidget *parent)
|
||
|
|
: QDialog(parent)
|
||
|
|
{
|
||
|
|
setWindowTitle("属性显示");
|
||
|
|
setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint );
|
||
|
|
_layout = new QVBoxLayout(this);
|
||
|
|
_layout->setContentsMargins(0, 0, 0, 0);
|
||
|
|
setMinimumSize(300, 500);
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
PropertyDlg::~PropertyDlg()
|
||
|
|
{
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
void PropertyDlg::setContent(QWidget* content)
|
||
|
|
{
|
||
|
|
if(content)
|
||
|
|
_layout->addWidget(content);
|
||
|
|
}
|
||
|
|
|
||
|
|
void PropertyDlg::removeContent(QWidget* content)
|
||
|
|
{
|
||
|
|
if(content)
|
||
|
|
_layout->removeWidget(content);
|
||
|
|
}
|