diff options
| author | MohammadHossein Qanbari <mohammad.qanbari@qt.io> | 2024-11-26 17:24:57 +0100 |
|---|---|---|
| committer | MohammadHossein Qanbari <mohammad.qanbari@qt.io> | 2024-11-28 03:23:37 +0100 |
| commit | 49456f2734ebeef12b875cf561cb8e5c7caff04b (patch) | |
| tree | da502e64267871142af87c145193a0f4c2ad88f9 /src/quick/doc/snippets/qml | |
| parent | a05fabab8c8f97a6793ba13fec276e72ea30da59 (diff) | |
QQuickSelectable: Fix selection in TableView and TreeView on Android
The issue was that the TableView was not selectable on the Android
platform. This was due to
`dynamic_cast<QQuickSelectable*>(QQuickTableViewPrivate*)` returning
null, which prevented the QQuickSelectionRectangle's DragHandler
(responsible for selecting cells by dragging) from being added to the
TableView.
Since dynamic_cast is not fully supported on Android, it fails sometimes
(returns null instead of performing the cast), when interface types lack
a key function (a non-inline and non-pure virtual function). To resolve
this, we need at least one key function.
References:
* https://developer.android.com/ndk/guides/cpp-support under "RTTI"
section
* https://developer.android.com/ndk/guides/common-problems under
"RTTI/exceptions not working across library boundaries" section
This patch adds a destructor (key function) for the QQuickSelectable
type to address this issue.
Additionally, related tests in TableViewDelegate and TreeViewDelegate
have been removed from the BLACKLIST.
Fixes: QTBUG-101159
Task-number: QTBUG-114636
Pick-to: 6.8 6.5
Change-Id: I91440b0b2f746e866d242d12fb20918a4830cd39
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/quick/doc/snippets/qml')
0 files changed, 0 insertions, 0 deletions
