Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-1245

Problem loading QML DLL on Python 3.8 when using Python from a Microsoft Store

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 5.14.1, 5.15.1
    • PySide
    • None
    • Windows, Python 3.8.2 and 3.8.6rc1, pip 19.2.3, Qt 5.14.1 and Qt 5.15.1, QML.
    • Windows

    Description

      I'm trying out Python + QML on Windows, and there is a problem with loading qtquick2plugin.dll.

      Steps to reproduce

      mkdir reproduce-bug
      cd reproduce-bug
      python -m venv .
      Scripts\activate.bat
      pip install PySide2

      Place the attached main.py and view.qml in this directory (from this tutorial).

      python main.py 

      This gives the following error

      QQmlApplicationEngine failed to load component
      file:///<snip>/reproduce-bug/view.qml:42:1: plugin cannot be loaded for module "QtQuick": Cannot load library <snip>\lib\site-packages\PySide2\qml\QtQuick.2\qtquick2plugin.dll: The specified module could not be found.

      The file it's looking for exists (directory also includes plugins.qmltypes and qmldir).

      It appears to be related to QML, since the two examples on this page work like a charm: https://doc.qt.io/qtforpython/quickstart.html.

      Yesterday, figuring this was a mistake on my part, I asked this question on #qt-pyside, where I got the reply:

      <cmaureir> I think all the errors you are getting with QML's DLL is due to a change in Python 3.8.x with that we partially solved for the examples and tests. frkleint we would need to fix the qml DLL stuff Can you open a bug report NyckoNL?

      So, here goes nothing .

      Hopefully I've provided the intel required, otherwise do ask. Is there perhaps a workaround I can apply in the meantime?

      Attachments

        1. main.py
          4 kB
        2. pyside1245.zip
          4 kB
        3. view.qml
          6 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            nyckonl Nico Schoenmaker
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes