PyQt5 to PySide2, loading UI-Files in different classes

后端 未结 3 677
后悔当初
后悔当初 2021-01-14 10:49

I have a python application which runs under python3.6 and is using PyQt5 for loading Ui windows. These windows were created with Qt Designer 5.9.4. The Code below shows a w

3条回答
  •  无人及你
    2021-01-14 11:26

    PySide2 brought back loadUiType in May 2020. So if you updgrade, you can get a drop-in replacement. The only difference is the import:

    from PySide2.QtUiTools import loadUiType
    

    Syntax is the same (you will use loadUiType()[0] )

提交回复
热议问题