update
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
#pragma once
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QComboBox>
|
||||
#include <QFormLayout>
|
||||
#include <QLineEdit>
|
||||
#include <QPushButton>
|
||||
#include <QTextEdit>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
namespace gui {
|
||||
|
||||
/// 单行文本/容器:随面板宽度伸缩,不强行指定最小像素宽。
|
||||
void polishPropertyStretchyTextField(QWidget* w);
|
||||
|
||||
/// 紧凑属性表:标签在上、控件在下(默认 ~200px 宽即可完整显示,无并排裁切)。
|
||||
void polishPropertyFormLayout(QFormLayout* form);
|
||||
|
||||
void polishPropertyVBoxLayout(QVBoxLayout* lay);
|
||||
|
||||
class PropertyPanelLineEdit final : public QLineEdit {
|
||||
public:
|
||||
explicit PropertyPanelLineEdit(QWidget* parent = nullptr);
|
||||
};
|
||||
|
||||
class PropertyPanelComboBox final : public QComboBox {
|
||||
public:
|
||||
explicit PropertyPanelComboBox(QWidget* parent = nullptr);
|
||||
};
|
||||
|
||||
class PropertyPanelCheckBox final : public QCheckBox {
|
||||
public:
|
||||
explicit PropertyPanelCheckBox(const QString& text, QWidget* parent = nullptr);
|
||||
};
|
||||
|
||||
class PropertyPanelPushButton final : public QPushButton {
|
||||
public:
|
||||
explicit PropertyPanelPushButton(const QString& text, QWidget* parent = nullptr);
|
||||
};
|
||||
|
||||
class PropertyPanelTextEdit final : public QTextEdit {
|
||||
public:
|
||||
explicit PropertyPanelTextEdit(QWidget* parent = nullptr);
|
||||
};
|
||||
|
||||
} // namespace gui
|
||||
Reference in New Issue
Block a user