card_widget =========== .. py:module:: qfluentwidgets.components.widgets.card_widget Module Contents --------------- .. autoapisummary:: qfluentwidgets.components.widgets.card_widget.CardWidget qfluentwidgets.components.widgets.card_widget.SimpleCardWidget qfluentwidgets.components.widgets.card_widget.ElevatedCardWidget qfluentwidgets.components.widgets.card_widget.CardSeparator qfluentwidgets.components.widgets.card_widget.HeaderCardWidget qfluentwidgets.components.widgets.card_widget.CardGroupWidget qfluentwidgets.components.widgets.card_widget.GroupHeaderCardWidget .. py:class:: CardWidget(parent=None) Bases: :py:obj:`qfluentwidgets.common.animation.BackgroundAnimationWidget`, :py:obj:`PyQt5.QtWidgets.QFrame` Card widget .. py:attribute:: clicked .. py:method:: mouseReleaseEvent(e) .. py:method:: setClickEnabled(isEnabled: bool) .. py:method:: isClickEnabled() .. py:method:: getBorderRadius() .. py:method:: setBorderRadius(radius: int) .. py:method:: paintEvent(e) .. py:attribute:: borderRadius .. py:class:: SimpleCardWidget(parent=None) Bases: :py:obj:`CardWidget` Simple card widget .. py:method:: paintEvent(e) .. py:class:: ElevatedCardWidget(parent=None) Bases: :py:obj:`SimpleCardWidget` Card widget with shadow effect .. py:attribute:: shadowAni .. py:attribute:: elevatedAni .. py:method:: enterEvent(e) .. py:method:: leaveEvent(e) .. py:method:: mousePressEvent(e) .. py:class:: CardSeparator(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` Card separator .. py:method:: paintEvent(e) .. py:class:: HeaderCardWidget(parent=None) Bases: :py:obj:`SimpleCardWidget` Header card widget .. py:attribute:: headerView .. py:attribute:: headerLabel .. py:attribute:: separator .. py:attribute:: view .. py:attribute:: vBoxLayout .. py:attribute:: headerLayout .. py:attribute:: viewLayout .. py:method:: getTitle() .. py:method:: setTitle(title: str) .. py:attribute:: title .. py:class:: CardGroupWidget(icon: Union[str, qfluentwidgets.common.icon.FluentIconBase, PyQt5.QtGui.QIcon], title: str, content: str, parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` .. py:attribute:: vBoxLayout .. py:attribute:: hBoxLayout .. py:attribute:: iconWidget .. py:attribute:: titleLabel .. py:attribute:: contentLabel .. py:attribute:: textLayout .. py:attribute:: separator .. py:method:: title() .. py:method:: setTitle(text: str) .. py:method:: content() .. py:method:: setContent(text: str) .. py:method:: icon() .. py:method:: setIcon(icon: Union[str, qfluentwidgets.common.icon.FluentIconBase, PyQt5.QtGui.QIcon]) .. py:method:: setIconSize(size: PyQt5.QtCore.QSize) .. py:method:: setSeparatorVisible(isVisible: bool) .. py:method:: isSeparatorVisible() .. py:method:: addWidget(widget: PyQt5.QtWidgets.QWidget, stretch=0) .. py:class:: GroupHeaderCardWidget(parent=None) Bases: :py:obj:`HeaderCardWidget` Group header card widget .. py:method:: addGroup(icon: Union[str, qfluentwidgets.common.icon.FluentIconBase, PyQt5.QtGui.QIcon], title: str, content: str, widget: PyQt5.QtWidgets.QWidget, stretch=0) -> CardGroupWidget add widget to a new group Parameters ---------- icon: str | QIcon | FluentIconBase the icon to be drawn title: str the title of card content: str the content of card widget: QWidget the widget to be added stretch: int the layout stretch of widget .. py:method:: groupCount()