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

Registering custom widgets for Qt Designer fails without error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • 6.4.0.1, 6.4.2
    • Tooling
    • None
    • Python 3.11 venv
    • Windows

    Description

      I'm trying to register my custom widgets for use in Qt Designer using this guide:

      https://doc-snapshots.qt.io/qtforpython-dev/tutorials/basictutorial/uifiles.html#custom-widgets-in-qt-designer

      The basic example works, but as soon as I try anything practical (with external dependencies) the registration fails.

      There is no warning or error message. The widget will simply not show up in Qt Designer.

      Some concrete examples that cause the registration to fail include:

      • using relative imports in registerXYZ.py
      from .custom_widget import CustomWidget
      
      • importing numpy in registerXYZ.py or anywhere else down the import tree
      • importing any package that is installed in editable mode

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            maxxpower Markus Fleischhacker
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes