What I mean, is that the following code works in debug without assertions:
#include
#include
#include
#include "myobject.h"
int main(int argc, char *argv[])
{
#if defined(Q_OS_WIN)
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif
QGuiApplication app(argc, a
If the context object is null, you probably have an error somewhere, your
context should outlive your object, unless you are during the creation of
the object step (after the QQmlComponent beginCreate() but before
the completeCreate() call?). If so indeed the object is not completed yet.
If this is
That's what I already tried but the issue is that context object is null
before and after setting context properties/loading QML.
Anyway, thank you for reply!
2017-12-20 16:21 GMT+00:00 Jérôme Godbout :
> I'm not sure it will work but one might try. You might recover the object
> context and may
I'm not sure it will work but one might try. You might recover the object
context and maybe scan the meta object to find the properties.
*auto context = QQmlEngine::contextForObject(myObjPtr);*
Since there's no getter into the context directly. The only getter is
*contextProperty(const QString& n
Let's say I exposed 'property1' to QML from C++ using
setContextProperty. How can I enumerate all the context properties
exposed from QML side? I've tried enumerating properties of 'Qt'
object but obviously it didn't work.
___
Interest mailing list
Intere