Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
5.15, 6.0.0
-
-
c3999f96536ac359ba94d80755230e85238d578a
Description
QQuickTableView has some properties with a revision, e.g:
Q_PROPERTY(int topRow READ topRow NOTIFY topRowChanged REVISION(6, 0))
But if you subclass QQuickTableView from outside Qt (e.g like we do in Qt for TreeView), those revisioned properties will not be available from QML. E.g, if you do:
#include <QtQuick/private/qquicktableview_p.h> class TreeView : public QQuickTableView { Q_OBJECT QML_ELEMENT public: TreeView(QQuickItem *parent = nullptr) : QQuickTableView(parent) {} };
...and then use it:
import QtQuick import QtQuick.Window import TreeView Window { width: 480 height: 640 visible: true TreeView { anchors.fill: parent model: 10 rowSpacing: 1 delegate: Rectangle { implicitWidth: 100 implicitHeight: 20 color: "green" } onTopRowChanged: print(topRow) } }
You will get an error that says:
qrc:/main.qml:20:9: "TreeView.onTopRowChanged" is not available in TreeView 6.0.
Attachments
Issue Links
- is required for
-
QTBUG-92070 Feature parity for item views in Qt Quick compared to Widgets
- In Progress
- relates to
-
QTBUG-88245 ReferenceError: implicitIndicatorHeight is not defined
- Closed
- resulted in
-
QTBUG-102800 qmltyperegistrar generates anonymous base types only for direct ancestor
- Closed