Details
-
Suggestion
-
Resolution: Unresolved
-
P5: Not important
-
None
-
5.7.0
-
None
Description
To create a derived QWidget outside the qt sources it is possible to derive the dptr from QWidgetPrivate as it is exported using Q_WIDGETS_EXPORT.
[...] class Q_WIDGETS_EXPORT QWidgetPrivate : public QObjectPrivate [...]
However, not all *Private classes are exported, f.ex.
[...] class QAbstractSpinBoxPrivate : public QWidgetPrivate [...]
or
[...] class QAbstractButtonPrivate : public QWidgetPrivate [...]
Which makes it impossible to customize these widgets using the pimpl idiom. I think that at least the QAbstract*Private classes should be exported as the QAbstract*-Widgets are specifically designed to be derived. The issue also exists in Qt 5.6.x and Qt 5.5.x (I did not check older versions)
I found a topic in the forum with he same problem: https://forum.qt.io/topic/52432/undefined-reference-to-qabstractitemviewprivate