Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
5.12.4
-
None
Description
Thanks as ever for Qt, which is excellent. Further to the Qt6 blog post and request for broad-brush suggestions:
When attempting to modify Qt widgets for specific situations, it is often very hard to proceed into complex territory because the code depends on special private classes. For example, my attempt to write a new QScrollArea failed as follows:
- one can rewrite QScrollArea and QScrollAreaPrivate;
- and then QAbstractScrollArea and QAbstractScrollAreaPrivate;
- but QAbstractScrollAreaPrivate notes that it has "friend class QWidgetPrivate;" and in qwidget.cpp we see that QWidgetPrivate has special handling for QAbstractScrollArea.
Therefore, it sometimes becomes impossible to make modified versions of parts of the widget/layout system because they are tightly integrated with private classes.
I quite understand if the private class system is necessary (e.g. for speed, binary compatibility, or some other library-related reason) – but is it? Could these sorts of private classes, in a future Qt6, be integrated into the public versions, so that developers can extend them more easily and have the Qt framework talk to them via their virtual functions?