diff options
Diffstat (limited to 'src/corelib/kernel/qproperty.cpp')
-rw-r--r-- | src/corelib/kernel/qproperty.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/corelib/kernel/qproperty.cpp b/src/corelib/kernel/qproperty.cpp index 1fd5951675..20efbaa1aa 100644 --- a/src/corelib/kernel/qproperty.cpp +++ b/src/corelib/kernel/qproperty.cpp @@ -947,8 +947,22 @@ QString QPropertyBindingError::description() const \snippet code/src_corelib_kernel_qproperty.cpp 0 - If the property does not need a changed notification, you can leave out the "NOFITY xChanged" in the Q_PROPERTY macro as well as the last argument - of the Q_OBJECT_BINDABLE_PROPERTY macro. + If you need to directly initialize the property with some non-default value, + you can use the Q_OBJECT_BINDABLE_PROPERTY_WITH_ARGS macro. It accepts a + value for the initialization as one of its parameters. + + \snippet code/src_corelib_kernel_qproperty.cpp 1 + + Q_OBJECT_BINDABLE_PROPERTY_WITH_ARGS does not support multiple arguments + directly. If your property requires multiple arguments for initialization, + please explicitly call the specific constructor. + + \snippet code/src_corelib_kernel_qproperty.cpp 2 + + If the property does not need a changed notification, you can leave out the + "NOFITY xChanged" in the Q_PROPERTY macro as well as the last argument + of the Q_OBJECT_BINDABLE_PROPERTY and Q_OBJECT_BINDABLE_PROPERTY_WITH_ARGS + macros. */ /*! |