Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-25036

Add quickfix to add a Qt6 Binding to an existing Q_PROPERTY

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • None
    • C/C++/Obj-C++ Support
    • None

    Description

      See https://www.qt.io/blog/property-bindings-in-qt-6. A Quickfix to generate the new thinks like here:

      class MyObject : public QObject
      {
          Q_PROPERTY(int x GET x SET setX BINDABLE bindableX)
          // the line below was “int xData;” in Qt 5
          Q_OBJECT_BINDABLE_PROPERTY(MyObject, int, xData)
      public:
          int x() { return xData; }
          void setX(int x) { xData = x; }
          QBindable<int> bindableX() { return &xData; }
      };

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            autoantwort autoantwort
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes