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

uic doesn't import QAbstractItemView for QTableView/QTreeView EditTriggers

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • 6.2.4
    • 6.2.2
    • Tooling
    • None
    • Linux/X11
    • e376c229e9 (qt/qtbase/dev) e376c229e9 (qt/tqtc-qtbase/dev) 9ab362b778 (qt/qtbase/6.3) 9ab362b778 (qt/tqtc-qtbase/6.3) d02947ddae (qt/qtbase/6.2) d02947ddae (qt/tqtc-qtbase/6.2)

      Description is based on example (files attached):

      1) main_wnd.ui - UI file created with Qt Designer 6.2.2. It is very basic and contains only QTableView. Important: editTriggers are changed from default value to nothing (it appears problem isn't present if default set of edit triggers is used and present if something is configured).

      2) main_wnd.py - python class compiled from main_wnd.ui with help of command /usr/lib/qt6/uic -g python -o ./main_wnd.py ./main_wnd.ui. Here the problem is already visible - it uses reference to QAbstractItemView but it isn't imported from PySide6.QtWidgets.

      3) main.py - simple script to show the window but it will fail with NameError: name 'QAbstractItemView' is not defined error

       

      Exactly the same problem happens for QTreeView

        1. pyside1773.zip
          2 kB
        2. main.py
          0.4 kB
        3. main_wnd.ui
          0.9 kB
        4. main_wnd.py
          2 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            kleint Friedemann Kleint
            starterkit Ivan Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: