Promote PyQt Widget

后端 未结 1 600
名媛妹妹
名媛妹妹 2021-01-02 06:42

I\'m using PyQt and trying to promote a widget in QtDesigner. I\'m able to get it working if I specify the full module path, in the \"Header file\" field, to the file that c

相关标签:
1条回答
  • 2021-01-02 07:14

    I got it figured out, my actual code is slightly different then the simplified example I gave. My actual code is more like this:

    /PythonModuleRoot/Ui/MainUi.py
    
    /PythonModuleRoot/Ui/MainUi.ui
    
    /PythonModuleRoot/Ui/Widgets/CustomWidget.py
    

    So I just needed to change the contents of Header file to be how MainUi would import CustomWidget, so: "Widgets.CustomWidget". This article pointed me in the right direction: http://www.mail-archive.com/pyqt@riverbankcomputing.com/msg17893.html

    0 讨论(0)
提交回复
热议问题