qtabstractitemmodel_java example was changed to use editable model.
Reflect that change in the example docs.
Fixes: QTBUG-132395
Change-Id: Ia4d1b33b9b8862efad502fe45e6fbd3584ca274f
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Since setData() and dataChanged() methods were added to
QtAbstractItemModel Java class, modify the existing model in
qtabstractitemmodel example to an editable one to showcase these
methods.
Changes includes:
- Main.qml:
- Minor QML coding convention based changes
- Changed cell size
- Changes that enable cell text editing and
forwarding the changes to the model
- Changed Text alignment inside cell
- Cell text is fetched from new "edit" role
MyDataModel.java:
- Added override for setData()
- Removed not needed roles "column" and "row" and
replaced them with new "edit" role
- Modified the Cell class to suit better editable model
- Squashed generateRow() and generateNewRow() into one
generateNewRow()
- Added internal datalist updating to removeColumn()
Fixes: QTBUG-130254
Change-Id: I791ad33e3b729617a7f53f6553e11fc39878edae
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
These were used in early versions of the Android Studio plugin to copy
and package the libraries created by Qt build before AAR builds were a
thing. Probably at some point they were accidentally committed into the
examples.
I tried builds after these were removed and there was no change to the
behavior of the app.
Task-number: QTBUG-131673
Pick-to: 6.8
Change-Id: I9f49d24bea3d7da8ba898af966066fb4050defc5
Reviewed-by: Nikunj Arora <nikunj.arora@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
For some reason the Java-based examples have one extra leading
whitespace character in the QtBuild task block in build.gradle(.kts).
Remove those because they don't look nice and parsing them requires a
bit more work.
Pick-to: 6.8
Change-Id: Ifbe5cd2e911612f83563a0cc3ec4b16138ce7e5e
Reviewed-by: Tero Koponen <tero.koponen@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This is not needed after 0db5b424cdaede8724886e8a1eda1380382d9aaf.
Change-Id: Ic5fc2bccf260cfdc159212324fb066d9137753c0
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
This change replaces the 0.1 SNAPSHOT versions with
1.+ version which means 1.0 and above.
We should also remove Qt maven repository URL so the
plugin can be fetched from mavenCentral.
Task-number: QTBUG-128417
Pick-to: 6.8
Change-Id: Id1006b64f6bf3f0d13d03a4f26b441236aa77cc7
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Remove optional qtKitDir variable and explanation from examples
build.gradle files, as it is already mentioned in documentation.
Rephrase "Relative for pre-installed (Installer or MaintenanceTool)
installations." comment in examples build.gradle files.
Task-number: QTTA-111
Pick-to: 6.8
Change-Id: Iee2eda91a994ddab061d636c739a480bd7a946f5
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
As the QtQuickView.loadComponent() became QtQuickView.loadContent()
and the QtQmlComponent renamed to QtQuickViewContent, the member names
in examples and related documentation content and documentation links
need to reflect the change, where required.
This change includes renamings, where they are applicable. There are
some cases that the word "component" is a better match, eg. when the
sentence is referring to signals or properties which are directly
talking about the QML component but not the QtQuickViewContent.
Task-number: QTBUG-127084
Pick-to: 6.8
Change-Id: I33ff259d3dfc97fb6b776dd676c19c3eea0842e4
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Added dimens.xml files for different display densities from where
the button margins, textsizes and paddings are fetched according to
the current display density.
Added corner radiuses for the buttons, to make the corners look the
similar on different densities.
Task-number: QTBUG-127848
Pick-to: 6.8
Change-Id: Idef43338b7636aabb3884efe4a4292489e307849
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
Added synchronized to each function to synchronize
thread execution in the example. Exception is the
constructor that can't take synchronized.
Task-number: QTBUG-127467
Pick-to: 6.8
Change-Id: I7c7bf8f245dbe484ca8e556769b3acd6732527ee
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
Adds documentation for Android Studio example application project.
Explains how to handle complex data types between Java and QML.
Explains the project structure and thread contextes with code examples.
Example opens up the usage of two Java API classes
QtAbstractItemModel (QtAIM) and QtModelIndex (QtMI).
Task-number: QTBUG-126457
Pick-to: 6.8
Change-Id: Ibbd10b74aa415985f3edd0affa8d0301d71aa8c0
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Modified
-settings.gradle to use Qt Maven (for now)
-build.gradle to use qtgradleplugin from Qt Maven
Fixes: QTBUG-127622
Pick-to: 6.8
Change-Id: I35401f4c098fcb5b150c5c68e93ab08d98028eb2
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
Reviewed-by: Olli Vuolteenaho <olli.vuolteenaho@qt.io>
Patch adds an Android Studio example application project.
Project has a Android project and a Qt project. Qt project
can be imported into Android project.
Example shows how to handle complex data types between Java and QML.
In QML the data use is demonstrated with TableView item and in Java
side with model of two-dimensional ArrayList items for Cell's.
First dimension of the array list is rows and second is columns.
Example uses 26 rows and columns, that matches to amount of
alphabets from A to Z.
Example opens up the usage of two Java API classes
QtAbstractItemModel (QtAIM) and QtModelIndex (QtMI).
Task-number: QTBUG-125606
Pick-to: 6.8
Change-Id: I61dee80618d852bf6e42f97f28e0a064987557e0
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>