I am currently trying to access the source code for PyQt5's QTabBar Class but am not entirely sure how to do so. I've attempted using the inspect module and have examined the PyQt5-5.15.4.tar.gz file found on pypi.org, but I still haven't found the file where the QTabBar is defined in Python. I understand that the C++ source code is readily available.
Asked
Active
Viewed 1,014 times
0
-
1Sorry, can you elaborate on how you reached the conclusion that PyQT5 is written in Python? In any event, this question is a request for off-site resources, which is explicitly off-topic for Stack Overflow as defined in the [help/on-topic]. – esqew Jul 12 '21 at 15:33
-
Based on your response, I've googled it and have now learned that it is not. Apologies for off-topic question and the confusion on my part. – Nick Campbell Jul 12 '21 at 15:59
1 Answers
2
There is no such code. PyQt5 is a Qt wrapper, this is through SIP that creates CPython code (python implementation written in C) that wraps each class. The same happens with PySide2 that Shiboken uses.
In general, it is not necessary to know how the Qt code implements, but only to read the docs (The docs are very good) that indicates the behavior of the code. Much of Qt's public API code is simple and straightforward to understand, but the private API where the magic happens can be changeable.

eyllanesc
- 235,170
- 19
- 170
- 241
-
Where does this SIP reside?. Btw you can make that argument for any codebase. Maybe there's no need to know how the Linux kernel is implemented for most people. Why don't they just make it closed source? – Jacob Sánchez May 27 '23 at 14:54
-
1@JacobSánchez [Here](https://riverbankcomputing.com/hg/sip) you can find the SIP repo. The main project website with refernces to the docs is [here](https://www.riverbankcomputing.com/software/sip/) – jeanggi90 Aug 03 '23 at 23:40