Skip to content

Qt5 import issue compared with Qt, PyQt or Pyside #8

Open
@hannesdelbeke

Description

@hannesdelbeke

the old Qt module can easily subsitute Pyside2
but when trying that with the new Qt5 it has to be done in a specific way.

it doesn't allow us to do this

from PySide2.QtWidgets import QApplication
from Qt.QtWidgets import QApplication
from Qt5.QtWidgets import QApplication  # errors
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
ModuleNotFoundError: No module named 'Qt5.QtWidgets'; 'Qt5' is not a package

This is fine

import PySide2
import Qt
import Qt5

This is fine

from PySide2 import QtWidgets
from Qt import QtWidgets
from Qt5 import QtWidgets

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions