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(self, QActionEvent)
changeEvent(self, QEvent)
childEvent(self, QChildEvent)
closeEvent(self, QCloseEvent)
connectNotify(self, QMetaMethod)
contextMenuEvent(self, QContextMenuEvent)
create(self, window: sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)
customEvent(self, QEvent)
destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)
disconnectNotify(self, QMetaMethod)
dragEnterEvent(self, QDragEnterEvent)
dragLeaveEvent(self, QDragLeaveEvent)
dragMoveEvent(self, QDragMoveEvent)
dropEvent(self, QDropEvent)
enterEvent(self, QEvent)
event(self, QEvent) → bool
focusInEvent(self, QFocusEvent)
focusNextChild(self) → bool
focusNextPrevChild(self, bool) → bool
focusOutEvent(self, QFocusEvent)
focusPreviousChild(self) → bool
hideEvent(self, QHideEvent)
initPainter(self, QPainter)
inputMethodEvent(self, QInputMethodEvent)
isSignalConnected(self, QMetaMethod) → bool
keyPressEvent(self, QKeyEvent)
keyReleaseEvent(self, QKeyEvent)
leaveEvent(self, QEvent)
metric(self, QPaintDevice.PaintDeviceMetric) → int
mouseDoubleClickEvent(self, QMouseEvent)
mouseMoveEvent(self, QMouseEvent)
mousePressEvent(self, QMouseEvent)
mouseReleaseEvent(self, QMouseEvent)
moveEvent(self, QMoveEvent)
nativeEvent(self, Union[QByteArray, bytes, bytearray], sip.voidptr) → Tuple[bool, int]
paintEvent(self, QPaintEvent)
receivers(self, PYQT_SIGNAL) → int
resizeEvent(self, QResizeEvent)
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(self) → QObject
senderSignalIndex(self) → int
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(self) → QPainter
showEvent(self, QShowEvent)
tabletEvent(self, QTabletEvent)
timerEvent(self, QTimerEvent)
updateMicroFocus(self)
wheelEvent(self, QWheelEvent)