Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
6.2.0, 6.3.0, 6.4.0
-
None
Description
(Apologies if there's another open issue on this, if so I wasn't able to find it)
It appears that, in all versions of PySide6 (but not in PySide2) user docstrings are not preserved in subclasses of QObject.
In [1]: from PySide6.QtCore import QObject ...: ...: class A: ...: """I'm a docstring""" ...: ...: class B(QObject): ...: """I'm another docstring""" ...: In [2]: A.__doc__ Out[2]: "I'm a docstring" In [3]: B.__doc__ # empty
This is problematic, both for interactive help, as well as autogenerated documentation pages.
Thanks!
Python 3.10 Qt 6.4.2 (x86_64-little_endian-lp64 shared (dynamic) debug build; by GCC 11.3.0) A.__doc__= I'm a docstring B.__doc__= None
Python 3.10 Qt 5.15.11 (x86_64-little_endian-lp64 shared (dynamic) debug build; by GCC 11.2.0) A.__doc__= I'm a docstring B.__doc__= I'm another docstring
Attachments
Issue Links
- duplicates
-
PYSIDE-1884 __doc__ returns None from Qt subclass
- Closed