QPdfDocument.Error.None : syntax error in Python
Solved
Qt for Python
-
Hello,
In the Pyside6 documentation, there is
QPdfDocument.Error.None
.But if I run this script :
pdf_path = "C:\myfile.pdf" pdf_doc = QPdfDocument() load_error = pdf_doc.load(pdf_path) if load_error != QPdfDocument.Error.None: print("All went good.")
I get this error :
if load_error != QPdfDocument.Error.None: ^^^^ SyntaxError: invalid syntax
I am not very familiar with Pyside6 and not a very good programmer in Python. But
None
seems to be a reserved word in Python and I cannot understand how to use this error. I found nothing else aboutQPdfDocument.Error.None
on the internet.Regards
-
Try: QPdfDocument.Error.None_ .
-
S SGaist has marked this topic as solved