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

"Windows fatal exception: access violation" on ItemDelegateOnColumn

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.9.1, 6.8.3
    • PySide
    • None
    • Windows 11 Family 24H2
      Python 3.11.4
    • Windows

    Description

      I'm trying to call the setItemDelegateForColumn method on two column of a QAbstractTableModel that I implemented. It works perfectly fine when called on either the first or the second column, but it systematically crashes when called on both. (Full code attached)
       
      table.setItemDelegateForColumn(0, MultiTextDelegate())
      table.setItemDelegateForColumn(1, MultiTextDelegate())
       
       

       
      When called on both columns, the window loads for a few seconds, and then crashes without any error message. Running with python -X dev main.py got me the following message though :
       
      Windows fatal exception: access violation

      Current thread 0x0000074c (most recent call first):
        File "C:\...\main.py", line 76 in <module> (line 76 is app.exec())

       

      I want to add that I'm not an expert, I might be missing something obvious, but I've been playing with this for a few days, and I still can't figure out what's wrong from my side

      Attachments

        1. image-2025-07-02-19-31-34-849.png
          image-2025-07-02-19-31-34-849.png
          6 kB
        2. image-2025-07-02-19-32-21-049.png
          image-2025-07-02-19-32-21-049.png
          6 kB
        3. main.py
          2 kB
        4. pyside3132_stack.txt
          54 kB
        5. pyside3132.py
          3 kB
        6. pyside3132_pyqt.py
          3 kB

        Issue Links

          For Gerrit Dashboard: PYSIDE-3132
          # Subject Branch Project Status CR V

          Activity

            People

              kleint Friedemann Kleint
              fredrik2002 Frédrik Calvet
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There is 1 open Gerrit change