Class: QgsValidityCheckResultsWidget

class qgis.gui.QgsValidityCheckResultsWidget(parent: QWidget)

Bases: PyQt5.QtWidgets.QWidget

Constructor for QgsValidityCheckResultsWidget, with the specified parent widget.

A reusable widget which displays a summary of the results from a QgsAbstractValidityCheck (or checks).

New in version 3.6.

Parameters

parent

actionEvent()
changeEvent()
childEvent()
closeEvent()
connectNotify()
contextMenuEvent()
create()
customEvent()
destroy()
disconnectNotify()
dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
dropEvent()
enterEvent()
event()
focusInEvent()
focusNextChild()
focusNextPrevChild()
focusOutEvent()
focusPreviousChild()
hideEvent()
initPainter()
inputMethodEvent()
isSignalConnected()
keyPressEvent()
keyReleaseEvent()
leaveEvent()
metric()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
moveEvent()
nativeEvent()
paintEvent()
receivers()
resizeEvent()
runChecks(type: int, context: QgsValidityCheckContext, title: str, description: str, parent: QWidget = None) → bool

Runs all registered validity checks of the given type, and if any warnings or critical errors are encountered then displays them to users in a dialog.

The context argument must specify the correct QgsValidityCheckContext subclass for the given check type.

The title argument is used as the dialog’s title, and the description text will be shown to users as an explanation of why the checks are being run.

The parent argument can be used to give a parent widget for the created dialogs.

If any critical errors are encountered by the checks, then users will not be allowed to click OK on the dialog and proceed with the operation. The function will return False.

Returns True if no warnings were encountered (and no dialog was shown to users), or if only warnings were shown and the user clicked OK after being shown these warnings.

This method is a blocking method, and runs all checks in the main thread.

Parameters
  • type (int) –

  • context (QgsValidityCheckContext) –

  • title (str) –

  • description (str) –

  • parent (QWidget = None) –

Return type

bool

sender()
senderSignalIndex()
setDescription(self, description: str)

Sets a description label to show at the top of the widget, e.g. notifying users of why they are being shown the warnings.

Parameters

description (str) –

setResults(self, results: Iterable[QgsValidityCheckResult])

Sets the list of check results to show in the dialog.

Parameters

results (Iterable[QgsValidityCheckResult]) –

sharedPainter()
showEvent()
tabletEvent()
timerEvent()
updateMicroFocus()
wheelEvent()