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

pyside6-uic not properly creating imports QAbstractItemView when NoEditTriggers Selected in QT Designer

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 6.2.2
    • PySide, Shiboken
    • None
    • Lenovo T490 Laptop; Windows 10 20H2 OS Build 19042.1466
    • Windows

    Description

      When generating a python file from a .ui file, pyside-uic creates a line in generated python file for a main window like the following:

              some_list_view.setEditTriggers(QAbstractItemView.NoEditTriggers)

      But pyside-uic does not add any import statement for QAbstractItemView at the top of the file.
      i.e:
      from PySide6.QtWidgets QAbstractItemView

      therefore, the program cannot be run without making a manual modification to the file to add the import statment above each time pyside-uic is created.

      This does not appear to be intentional behavior

      Attachments

        Issue Links

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

          Activity

            People

              crmaurei Cristian Maureira-Fredes
              jmortensen James Mortensen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes