Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. simple PySide2 QWidgets app loads Qt5Qml.dll, it should not load
QtWS25 Last Chance

simple PySide2 QWidgets app loads Qt5Qml.dll, it should not load

Scheduled Pinned Locked Moved Unsolved Qt for Python
1 Posts 1 Posters 349 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    yinkaisheng
    wrote on last edited by
    #1

    Hi
    I'm using PySide2-5.12.0-5.12.0-cp35.cp36.cp37-none-win32.whl with python 3.7.2 on Windows 7 SP1 64Bit.
    When I run the following code, a simple app only has a QPushButton.

    import sys
    from PySide2.QtWidgets import QApplication, QPushButton
    from PySide2.QtCore import Slot
    
    @Slot()
    def say_hello():
        print("Button clicked, Hello!")
    
    if __name__ == "__main__":
        app = QApplication(sys.argv)
        button = QPushButton("Click me")
        button.clicked.connect(say_hello)
        button.show()
        app.exec_()
    

    Use ProcessHacker to see the process's modules.
    I found that PySide2 loads Qt5Qml.dll and Qt5Network.dll.
    Why PySide2 loads the 2 dlls? This demo doesn't use qml and network.
    I think it shoud not load dlls that are not required.
    It will increase the app installer size if I package the app.
    PyQt5 doesn't have this issue.

    0_1547192771726_pyside2.png

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved