Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-57036

Export (all) widget privates to create custom widgets

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Reported
    • Priority: P5: Not important
    • Resolution: Unresolved
    • Affects Version/s: 5.7.0
    • Fix Version/s: None
    • Labels:
      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

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            qt.team.quick.subscriptions Qt Quick and Widgets Team
            Reporter:
            thomayto Thorsten Mayer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes