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

No way to call a custom setter for a QProperty outside of QObject hierarchy

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.0.0
    • Core: Object Model
    • None

    Description

      Normally if we need to use custom setter (that is doing smth more complicated than simply calling operator=()), we need to use Q_OBJECT_COMPAT_PROPERTY macro.

      However this macro does not work outside of QObject or QObjectPrivate hierarchy.

      I have identified at least 2 places, where the property is located outside of the hierarchy, and the custom setters are used:

      • QObject and its objectName property.
      • Most of the properties in QCoreApplication.

      Attachments

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

        Activity

          People

            fabiankosmale Fabian Kosmale
            ivan.solovev Ivan Solovev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes