This sends the particles towards the center of the ellipse with proportional speed, keeping the ellipse outline as they move to the center.
TrailEmitter uses that element to add smoke particles to trail the fire particles in the scene.
- \snippet examples/particles/emitters/content/trailemitter.qml 0
+ \snippet examples/particles/emitters/content/customemitter.qml 0
*/
\snippet examples/particles/imageparticle/content/colortable.qml 0
Deformation spins and squishes a starfish particle.
- \snippet examples/particles/imageparticle/content/colortable.qml spin
- \snippet examples/particles/imageparticle/content/colortable.qml deform
+ \snippet examples/particles/imageparticle/content/deformation.qml spin
+ \snippet examples/particles/imageparticle/content/deformation.qml deform
Rotation demonstrates the autoRotate property, so that particles rotate in the direction that they travel.
sourcedirs += ..
exampledirs += ../../../examples/qml \
+ ../../.. \
../ \
snippets
parsed by the QML engine. In this file, we specify that a plugin named
"chapter6-plugin" (the name of the example project) can be found in the "lib" subdirectory:
-\quotefile examples/tutorials/extending/chapter6-plugins/ChartsPlugin/qmldir
+\quotefile examples/tutorials/extending/chapter6-plugins/Charts/qmldir
Now we have a plugin, and instead of having a main.cpp and an executable, we can build
the project and then load the QML file using the \l{Prototyping with qmlscene}{qmlscene tool},
Here is an example that uses WorkerScript to periodically append the
current time to a list model:
- \snippet examples/quick/threading/threadedlistmodel/timedisplay.qml 0
+ \snippet quick/threading/threadedlistmodel/timedisplay.qml 0
The included file, \tt dataloader.js, looks like this:
- \snippet examples/quick/threading/threadedlistmodel/dataloader.js 0
+ \snippet quick/threading/threadedlistmodel/dataloader.js 0
The timer in the main example sends messages to the worker script by calling
\l WorkerScript::sendMessage(). When this message is received,
\brief The QJSEngine class provides an environment for evaluating JavaScript code.
\ingroup qtjavascript
+ \inmodule QtQml
\mainclass
\section1 Evaluating Scripts
{
}
+/*!
+ \internal
+*/
QJSEngine::QJSEngine(QJSEnginePrivate &dd, QObject *parent)
: QObject(dd, parent)
, d(new QV8Engine(this))
/*!
Creates a JavaScript object that wraps the given QObject \a
- object, using JavaScriptOwnership. The given \a options control
- various aspects of the interaction with the resulting script object.
+ object, using JavaScriptOwnership.
Signals and slots, properties and children of \a object are
available as properties of the created QJSValue.
\brief The QJSValue class acts as a container for Qt/JavaScript data types.
\ingroup qtjavascript
+ \inmodule QtQml
\mainclass
QJSValue supports the types defined in the \l{ECMA-262}
\brief The QJSValueIterator class provides a Java-style iterator for QJSValue.
\ingroup qtjavascript
+ \inmodule QtQml
The QJSValueIterator constructor takes a QJSValue as
#ifndef QT_NO_TRANSLATION
/*!
- \qmlmethod string qsTranslate(string context, string sourceText, string disambiguation, int n)
+ \qmlmethod string Qt::qsTranslate(string context, string sourceText, string disambiguation, int n)
Returns a translated version of \a sourceText within the given \a context, optionally based on a
\a disambiguation string and value of \a n for strings containing plurals;
}
/*!
- \qmlmethod string QT_TRANSLATE_NOOP(string context, string sourceText, string disambiguation)
+ \qmlmethod string Qt::qsTranslateNoOp(string context, string sourceText, string disambiguation)
Marks \a sourceText for dynamic translation in the given \a context; i.e, the stored \a sourceText
will not be altered.
}
/*!
- \qmlmethod string qsTr(string sourceText, string disambiguation, int n)
+ \qmlmethod string Qt::qsTr(string sourceText, string disambiguation, int n)
Returns a translated version of \a sourceText, optionally based on a
\a disambiguation string and value of \a n for strings containing plurals;
}
/*!
- \qmlmethod string QT_TR_NOOP(string sourceText, string disambiguation)
+ \qmlmethod string Qt::qsTrNoOp(string sourceText, string disambiguation)
Marks \a sourceText for dynamic translation; i.e, the stored \a sourceText
will not be altered.
}
/*!
- \qmlmethod string qsTrId(string id, int n)
+ \qmlmethod string Qt::qsTrId(string id, int n)
Returns a translated string identified by \a id.
If no matching string is found, the id itself is returned. This
}
/*!
- \qmlmethod string QT_TRID_NOOP(string id)
+ \qmlmethod string Qt::qsTrIdNoOp(string id)
Marks \a id for dynamic translation.