aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc/src/cppintegration/definetypes.qdoc
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Describe QML_FOREIGN in "Defining QML Types from C++"Ulf Hermann2021-01-291-0/+26
| | | | | | | | Fixes: QTBUG-83852 Change-Id: I8dd5fa6887ad607fe91ac658efa51152c46df36e Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* definetypes.qdoc: Add note about include path prefixesMaximilian Goldstein2021-01-041-0/+1
| | | | | | | | | We do not allow for prefixes when using declarative QML registration. Task-number: QTBUG-87221 Change-Id: Ie1ce604390d49601a48217c71ba161f1b5f5e6e0 Reviewed-by: Erik Schilling <ablu.erikschilling@gmail.com> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Doc: mention that INCLUDEPATH must be set in some casesMitch Curtis2020-11-201-0/+8
| | | | | | | | | Otherwise the generated type registrations .cpp file will not be able to include the sources. Pick-to: 6.0 5.15 Change-Id: I7821c7674b4341546da2fc49e584bf10cc60b46f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QML: Allow namespaces as extensions to typesUlf Hermann2020-11-021-0/+3
| | | | | | | | | | | | | | | | | This way we can access the enums of namespaces as properties of the primary type. This is achieved by: 1. Making enums of extended types available in the base type 2. Allowing the extension to be specified as plain metaObject rather than as type name. 3. Refraining from creating the extension if the create function does not exist. The goal of this is to declare the Qt namespace in a civilized way, but will also help with cleaning up the QtQuick value types and their enums. Change-Id: I13399741d30ce38d1bff753cfa1b11e72ccfbf6a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Doc: Fix documentation warnings for Qt QMLTopi Reinio2020-02-201-1/+1
| | | | | | Fixes: QTBUG-82313 Change-Id: I7c2f30411ab8011254d7c232c87cb12a39761bda Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Modernize the type definition docsUlf Hermann2020-02-121-79/+57
| | | | | | | | | | Mention the QML_* macros instead of the qmlRegister* functions and adapt the code examples to use them. Task-number: QTBUG-81615 Change-Id: I9e4cf5b3700b7e727b0f2a93035559b75b733adb Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Doc: fix code snippetPaul Wicking2019-07-191-1/+1
| | | | | | Task-number: QTBUG-77094 Change-Id: I9058bf7b65e8d390327af0624df611de4965f1e4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: Fix typos in code snippetsPaul Wicking2019-07-181-2/+2
| | | | | | Fixes: QTBUG-77094 Change-Id: Ia974c4d8abeab48a206fb868ee5532d4aeae7319 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: Clarify section about qmlRegisterInterface()Ulf Hermann2019-03-201-3/+4
| | | | | | | | There is very little you can do with things registered as interfaces. Change-Id: I5e4dcf8529c2d7c8012db3fa1dcfc23563cc2cba Fixes: QTBUG-74318 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Doc: link to C++ and QML integration flowchartMitch Curtis2019-03-121-0/+2
| | | | | | | | | | The chart makes it easier to find the correct way to register a C++ type with the QML type system, so it makes sense to link to it from these docs. Task-number: QTBUG-74318 Change-Id: Iba74ce02d200d6609dbb0a508d618226a6fe1e54 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* doc: Two class members can not have the same nameRainer Keller2019-02-011-1/+1
| | | | | | | At least gcc complains about it. Change-Id: I122b0bab2c2fcea24814a83f005be1ad4686aa78 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add note about revisions for grouped and attached property objectsMitch Curtis2018-04-161-0/+2
| | | | | | | If they're not supported, it should be documented. Change-Id: I9219db1c9d31666e005074a863b04438052b3f05 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Update to new QRandomGenerator APIThiago Macieira2017-12-051-1/+1
| | | | | | | | | | To get latest qtbase dev integrated in qt5 dev again without qtdeclarative 5.10->dev merge. Change-Id: I6905649aca2b06302df8cee2f660f1f92398d36a Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io> (cherry picked from commit ee00fa01dc41deaaedfa0d1d5cc6cd750bfe75f4) Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-241-5/+5
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlimport.cpp src/qml/qml/qqmlimport_p.h src/qml/qml/qqmltypenamecache.cpp Done-with: Ulf Hermann<ulf.hermann@qt.io> Change-Id: I41ba7a592b2659ddf53da6952ea3b456a7bba319
| * Fix outdated FDL license headerKai Koehne2017-10-171-5/+5
| | | | | | | | | | Change-Id: I76dccf547de40b5e72fd7abaa062fa96cb2c118a Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | Use QRandomGenerator instead of q?randThiago Macieira2017-08-231-2/+1
|/ | | | | Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Doc: Add \keyword for "Grouped" and "Attached" property topicsVenugopal Shivashankar2017-07-031-2/+2
| | | | | | | This enables searching the index list for the \keyword in Qt Creator Change-Id: Ic8fde82def48c4d0f4cbf0e75bc862e00ca3ca65 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: remove const from QQmlListProperty getterMitch Curtis2017-04-031-1/+1
| | | | | | | | | | | | The function cannot be const, as QQmlListProperty's constructor expects a non-const reference. Errors can result from following the docs: '<function-style-cast>': cannot convert from 'initializer list' to 'QQmlListProperty<QObject>' Change-Id: I2268ab08a130181857c21340604a2251ba66967e Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Add missing qmlRegisterExtendedUncreatableType variantKevin Ottens2017-02-171-0/+3
| | | | | | | | | | | | | We need another qmlRegisterExtendedUncreatableType allowing to pass the metaObjectRevision as third parameter. Otherwise extended uncreatable types can't use for instance REVISION in their properties. This is missing for some of the Qt 3D types for which we are cleaning up the versioning for 5.9.0 and which fall in this category. Change-Id: I20ebec339814d7f43cc4b2b58090406b0d5fb97e Task-Id: QTBUG-58895 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Use QDateTime::currentMSecsSinceEpoch() instead of currentDateTimeThiago Macieira2016-06-221-1/+1
| | | | | | | More efficient if all you want is the number of seconds. Change-Id: Ib57b52598e2f452985e9fffd145a36f2b3c703ea Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Doc: added spec on defining enums register.typesNico Vertriest2015-10-301-0/+1
| | | | | | Task-number: QTBUG-48050 Change-Id: Id737e89aa59885d22132bcde020ed04b509201ed Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Doc: Fixed several link errorsNico Vertriest2015-09-071-1/+1
| | | | | | | Change-Id: I684b8c0d238b7592b49abc0156bbc9791fdf6991 Task-number: QTBUG-43810 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Update copyright headersJani Heikkinen2015-02-121-6/+6
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Restore extension types documentationAlejandro Exojo2014-12-101-0/+46
| | | | | | | | | | | | | | | | | | The documentation on QML extension types was accidentally removed on the big restructuring of commit 28def0bdd084989c17a157e0c4ab80c259081caa. This restores it to a section on the "Defining QML Types from C++" page mostly unchanged, and makes the source of the example that was already there visible. The reference documentation of the qmlRegisterExtendedType is added as well, and the one for qmlRegisterExtendedUncreatableType and qmlRegisterCustomExtendedType that was added in fcb40ff6d71f4561401e6b2bd4d7fc706fff8eee is now fixed. It was not being generated because referred to "QQmlEgine" instead of "QQmlEngine". Change-Id: I1403b10076c64a4c0d760f72b06dd52c38b351a5 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Doc: apply title case to all section1 titlesNico Vertriest2014-09-241-1/+1
| | | | | | Task-number: QTBUG-41250 Change-Id: I303d989992c9685f73baae50c64accf71b43549f Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Doc: Remove duplicated wordsTopi Reinio2014-08-121-1/+1
| | | | | | | | Removes duplicated (repeated) words and fixes other minor documentation issues. Change-Id: I891f2b3e60194b207737425c1dcc1d35a5bd921a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* Fix some typosSergio Ahumada2014-03-031-1/+1
| | | | | Change-Id: Iea540b768232ea423ea7f04e41655198931cf36d Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Fix typosSze Howe Koh2013-11-051-1/+1
| | | | | | Task-number: QTBUG-33360 Change-Id: I913c14d3d6a90d2c20e40e246ad11f50a26c3ad9 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Un-overload the word "module"Sze Howe Koh2013-04-241-2/+2
| | | | | | | | | | | "The Qt Quick module contains the QtQuick QML module and the Qt Quick C++ module" is an odd way to describe things. The concept of a "QML module" is deeply entrenched so this patch won't touch it, but at least we can get rid of references to "C++ module"s. Change-Id: Ib06f8e3152551901dc6016cb37507cb9608d7863 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Qt Quick: Fix module name format (Pt 2/2)Sze Howe Koh2013-04-231-2/+2
| | | | | | | | | | | | Follow the conventions at http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation Attempt to differentiate between the whole module ("Qt Quick") and the QML import ("QtQuick") by encoding the latter with monospace font. There are places in the text where both representations are valid. Change-Id: If398304757e0a5106542c09099e1814084e54c5c Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Qt Quick: Fix module name format (Pt 1/2)Sze Howe Koh2013-04-231-4/+4
| | | | | | | | | | | | Follow the conventions at http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation Attempt to differentiate between the whole module ("Qt Quick") and the QML import ("QtQuick") by encoding the latter with monospace font. There are places in the text where both representations are valid. Change-Id: Id6e157a4191aaa4e23a9cd5c76abfe902fe43d33 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Qt QML: Fix module name formatSze Howe Koh2013-04-191-3/+3
| | | | | | | | | | Follow the conventions at http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation QtQml -> Qt QML Change-Id: I45ca4496a02214feab48707b026c6bec085df138 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Fixed some uses of terminolgies in qdoc files.Jerome Pasion2013-03-261-3/+3
| | | | | | | | | | | -"element" -> "type" or "object" (not in all cases where this change applies) -some instances of QtQuick. It should be "Qt Quick". -only in qdoc files. Examples and source code changes will be done later. Task-number: QTBUG-30180 Change-Id: Ie587461a138e97606f761ad1e90909c91b479303 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* doc: Fix some typos in C++ integration documentationEskil Abrahamsen Blomfeldt2012-09-261-1/+1
| | | | | Change-Id: I883109cf2528a5e10487b38f453c2eed96cc3204 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-231-14/+14
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Move the Property Modifier Type documentationChris Adams2012-08-271-6/+56
| | | | | | | | | | | Property Modifier Types are just another sort of QML object type, and don't deserve explicit top-level documentation. This commit moves the docs into the object types documentation, and adds documentation to the syntax page about the "<PropertyModifierObject> on <propertyName>" syntax. Change-Id: Ia9b707739b562d2c8b75fa99b88795ba4d415cf7 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Fix default property docsBea Lam2012-08-091-8/+5
| | | | | | | Item's default property is data. Change-Id: I60577f4cfbe954ab3311703915f43fecf4ed9bf2 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Update imports and module documentationChris Adams2012-08-081-20/+21
| | | | | | | | | | | | | | | | | | Recently, the qmldir syntax was modified to allow a module identifier directive to be specified. This allows us to guarantee that types provided in that namespace are not overridden by other modules. Given this fundamental change, the documentation needed to be updated to reflect the new terminology surrounding imports: - modules - identified vs legacy - directories - local and remote directory imports - JavaScript resources - scripts which can be imported directly Change-Id: I5a3d38de93d0186e79b87f2b3050f2b802088348 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Add type name to singleton (module api) implementations.Glenn Watson2012-08-081-19/+20
| | | | | | | | | | | | | This change renames the previous module api implementation to singleton types. When a singleton type is registered, a type name must be provided that is used when accessing the API from QML. This makes the implementation more consistent with the rest of QML. Task-number: QTBUG-26549 Change-Id: Iab0bb1ccf516bd3ae20aee562a64d22976e0aecd Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Restore QML/C++ extensions tutorial and fix plugin docs and examplesBea Lam2012-08-071-1/+7
| | | | | | | | | | | | | | | | | This restores the "Writing QML Extensions with C++" tutorial that was removed during the recent QML doc restructure. This also updates outdated docs in "Creating C++ Plugins for QML" that referred to the use of Q_EXPORT_PLUGIN2() and such as the process for writing QML plugins in Qt 5 has changed. Note the plugins.json line was removed from examples/qml/cppextensions/plugins/plugins.pro since this json file was removed in a previous commit, as plugins no longer require the empty json file. Change-Id: I795d6faf6a741466a952feb8e15b028ec3d52b69 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Fix various broken links in documentationBea Lam2012-08-031-2/+2
| | | | | Change-Id: I9e2dac37d18e3ca62e4a92be25e5c2e60ffeba00 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Use \b instead of \boldBea Lam2012-08-021-1/+1
| | | | | Change-Id: Ica77b78b113321f962066f1edabd34bf21d38910 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Document qmlAttachedPropertiesObject()Bea Lam2012-08-011-1/+11
| | | | | | | | This is discussed in the documentation on writing QML extensions from C++ but is not actually documented in the list of qml* functions. Change-Id: Id24be88dc3fa6d54cc5ee29e3da1686ea2732b39 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Revise the restructured "Integrating QML and C++" docsBea Lam2012-07-251-0/+658
These docs were yet to be cleaned up following the recent doc restructure. This changes most of the the content in these sections and includes some new docs and examples. Currently all the code snippets are included inline. In a later patch, these should be moved into the snippets/ directories and be included using the \snippet command instead. Alternatively they can be moved into examples/ to replace the BirthdayParty examples which are no longer referenced in these docs as of this patch. Task-number: QTBUG-26381 Change-Id: I94e3654e61476fad11fe81042d1bbe94fc649d06 Reviewed-by: Chris Adams <christopher.adams@nokia.com>