QHelpFilterSettingsWidgetclass provides a widget that allows for creating, editing and removing filters. 更多 …
New in version 5.15.
def
applySettings
(filterEngine)
def
readSettings
(filterEngine)
def
setAvailableComponents
(components)
def
setAvailableVersions
(versions)
The instance of
QHelpFilterSettingsWidgetmay be a part of a preferences dialog. Before showing the dialog,setAvailableComponents()andsetAvailableVersions()should be called, otherwise the filter settings widget will only offer a creation of empty filters, which wouldn’t be useful. In addition,readSettingsshould also be called to fill up the filter settings widget with the list of filters already stored in the filter engine. The creation of new filters, modifications to existing filters and removal of unneeded filters are handled by the widget automatically. If you want to store the current state of the widget and apply it to the filter engine e.g. after the user clicked the apply button - callapplySettings().
QHelpFilterSettingsWidget
(
[
parent=None
]
)
¶
- param parent
QWidget
Constructs a filter settings widget with
parent
作为父级 Widget。
PySide2.QtHelp.QHelpFilterSettingsWidget.
applySettings
(
filterEngine
)
¶
filterEngine
–
QHelpFilterEngine
bool
Writes the filter settings, currently presented in this filter settings widget, to the
filterEngine
. The old settings stored in the filter engine will be overwritten.
PySide2.QtHelp.QHelpFilterSettingsWidget.
readSettings
(
filterEngine
)
¶
filterEngine
–
QHelpFilterEngine
Reads the filter settings stored inside
filterEngine
and sets up this filter settings widget accordingly.
PySide2.QtHelp.QHelpFilterSettingsWidget.
setAvailableComponents
(
components
)
¶
components – 字符串列表
Sets the list of all available components to
components
.
PySide2.QtHelp.QHelpFilterSettingsWidget.
setAvailableVersions
(
versions
)
¶
versions –
Sets the list of all available version numbers to
versions
.
另请参阅