#include "propertyDialog.h" #include #include 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); }