Qt for Python/Reporting Bugs

From Qt Wiki
< Qt for Python
Revision as of 17:09, 7 January 2021 by Friedemannkleint (talk | contribs) (template)
Jump to navigation Jump to search


Bugs in Qt for Python can be reported at the bug tracker. The quality of the bug report can dramatically impact how likely it is that the bug will be fixed.

We follow the same criteria than any Qt related bug, check the Qt Reporting Bugs page for more information.

Step by step

Here is a nutshell description of how to report a bug :

  1. Visit bugreports.qt.io/browse/PYSIDE.
  2. If you don't have a Qt account, you should create one (https://account.qt.io/).
  3. Use the "Quick Search" field in the top right to try to find any similar bugs, some times there are related bugs that could be complementary to your issue.
    • Leave a comment with any additional info you have.
    • Click "Vote" — You will usually have a higher chance of having your bug fixed by voting on an already existing bug than creating a new one.
    • Add yourself as a watcher, if you want to track the progress of the bug via email.
  4. If you don't find a bug report which matches your issue, then click "Create New Issues", and fill out the fields.
    • Project: Qt for Python
    • Type: Bug or Suggestion
    • Component: Shiboken, Documentation or PySide
    • Description: Provide a detailed description of the issue
    • Environment: Write your current environment configuration, OS, Python version, PySide2 version, etc.
    • Attachment: Please include a minimal reproducible script.

Considerations

It could be the case that your issue is not a Qt for Python bug, but a Qt one which should be reported under the QT project. Please make sure before the bug is related to the Python bindings before submitting a bug.

  • Normally, Qt for Python bugs could expose some issues with Python directly.
  • Bugs related to graphics (rendering issues, errors related to style elements) are clearly Qt bugs
  • If you encounter a missing binding, you also will encounter a Python error.
  • On the other hand, when there is no clear error message, but some method does not work, this still could be a Qt for Python issue, but also a Qt bug.

If it is still not clear if your issue is from Qt or Qt for Python, please write a small Qt/C++ piece of code that can use the class/method you are having issues with, to see if the problem persist, if it does, it is a Qt bug.

Template for reproducer scripts

The following template code can be used for providing examples (attached as a file to the bug report, ideally named to reflect the bug number, eg. pyside1020.py):

#!/usr/bin/env python
import sys

try:
    from PySide6.QtCore import QLibraryInfo, qVersion
    from PySide6.QtWidgets import QApplication,QWidget
except ImportError:
    from PySide2.QtCore import QLibraryInfo, qVersion
    from PySide2.QtWidgets import QApplication,QWidget

class Window(QWidget):
    def __init__(self):
        super(Window, self).__init__()

if __name__ == '__main__':
    print('Python {}.{}'.format(sys.version_info[0], sys.version_info[1]))
    print(QLibraryInfo.build())
    app = QApplication(sys.argv)
    window = Window()
    window.setWindowTitle(qVersion())
    window.show()
    sys.exit(app.exec_())