跳转至

example/ui/widget/material/groupbox/GroupBoxExampleWindow.h

Material Design 3 GroupBox Example - Main Window. More...

Namespaces

Name
cf
cf::ui
cf::ui::example

Classes

Name
class cf::ui::example::GroupBoxExampleWindow
Main window for the Material GroupBox Example.

Detailed Description

Material Design 3 GroupBox Example - Main Window.

Author: CFDesktop Team

Version: 0.1

Date: 2026-03-01

A visual gallery to display Material Design 3 group box variants with various states and configurations.

Source code

#pragma once

#include <QGridLayout>
#include <QLabel>
#include <QMainWindow>
#include <QScrollArea>
#include <QVBoxLayout>
#include <QWidget>

namespace cf::ui::example {

class GroupBoxExampleWindow : public QMainWindow {
    Q_OBJECT

  public:
    explicit GroupBoxExampleWindow(QWidget* parent = nullptr);
    ~GroupBoxExampleWindow() override;

  private:
    void setupUI();
    void createHeader();
    void createBasicGroupBoxSection();
    void createElevationSection();
    void createBorderSection();
    void createCornerRadiusSection();
    void createContentExamplesSection();
    void createNestedGroupBoxSection();

  private:
    // UI components
    QScrollArea* scrollArea_;
    QWidget* scrollContent_;
    QVBoxLayout* scrollLayout_;

    // Header
    QLabel* titleLabel_;
    QLabel* subtitleLabel_;
};

} // namespace cf::ui::example

Updated on 2026-03-09 at 10:14:01 +0000