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

Exceptions in overwritten functions not reported reliably

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 6.8.3
    • PySide
    • None

    Description

      Sometimes I found that I overwrote a native method (e.g. `paintEvent` or `sizeHint`) and had a typo in it. It would just exit the function and return a value as if the override didn’t exist.

      Find the attached example of a custom QStyledItemDelegate where sizeHint is overwritten and a function is called that does not exist. Launching the application will have the cells in their default size. “sizeHint 1” is printed, “sizeHint 2” is not because the function was quit in the mean time.

      No exception or warning is printed.

      (In this particular instance a warning is printed when resizing the window but not initially)

      Attachments

        1. pyside3130_pyqt.py
          1 kB
        2. pyside3130.py
          1 kB
        3. pyside-override-bug.tar.gz
          0.6 kB

        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
              basyskom-broulik Kai Uwe Broulik
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes