mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Fix 'QRegExpValidator' vs. 'QRegularExpressionValidator'
This commit is contained in:
parent
681364bbea
commit
118d1eee16
1 changed files with 6 additions and 1 deletions
|
|
@ -8,6 +8,11 @@ import qtawesome
|
|||
from openpype.pipeline.create import SUBSET_NAME_ALLOWED_SYMBOLS
|
||||
from openpype.tools.utils import ErrorMessageBox
|
||||
|
||||
if hasattr(QtGui, "QRegularExpressionValidator"):
|
||||
RegExpValidatorClass = QtGui.QRegularExpressionValidator
|
||||
else:
|
||||
RegExpValidatorClass = QtGui.QRegExpValidator
|
||||
|
||||
|
||||
class CreateErrorMessageBox(ErrorMessageBox):
|
||||
def __init__(
|
||||
|
|
@ -82,7 +87,7 @@ class CreateErrorMessageBox(ErrorMessageBox):
|
|||
content_layout.addWidget(tb_widget)
|
||||
|
||||
|
||||
class SubsetNameValidator(QtGui.QRegExpValidator):
|
||||
class SubsetNameValidator(RegExpValidatorClass):
|
||||
invalid = QtCore.Signal(set)
|
||||
pattern = "^[{}]*$".format(SUBSET_NAME_ALLOWED_SYMBOLS)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue