Elektrine lite

← Feed

@sgillies@mastodon.social

Post #1817633

2026-04-26 19:11 UTC

@geospacedman Can you use the fully qualified name for QUrl? That would be PQ.QtCore.QUrl. Or, do `from PyQt5.QtCore import QUrl`.

Replies (1)

  • @sgillies I think its doing some dynamic wizardry... >>> import PyQt5 as PQ then this fails: >>> PQ.QtCore.QUrl Traceback (most recent call last): File "", line 1, in PQ.QtCore.QUrl ^^^^^^^^^ AttributeError: module 'PyQt5' has no attribute 'QtCore' but if I import it from PyQt5.QtCore: >>> from PyQt5.QtCore import QUrl it then works... >>> PQ.QtCore.QUrl (and thats all in the same session)

    Open ##1817634