#pragma once #include #include #include #include #include #include #include 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