Important: Please read the Qt Code of Conduct -

Application falls after adding QtLocation to QML

  • Hi!
    I need to add QML form to my QWidget app. So, i decide to do it using QQuickWidget but application falls(((.
    I have removed many part of code and leaved this:

    QApplication a(argc, argv);
    MainWindow w;;
    QQuickWidget	*wq = new QQuickWidget();
    return a.exec();

    In constructor of MainWindow only ui->setupUi(this);
    qml file:

    import QtQuick 2.13
    import QtPositioning 5.13
    Rectangle {
        color: "red"
        Component.onCompleted: console.log("11111111111")

    In program output I saw:

    qml: 11111111
    The program has unexpectedly finished.

    But application works ok if I'm removing import QtPositioning 5.13.

    Help me please)))

  • By the way, it works fine if I call after wq->show()

  • So, so, so...
    I got this error:

    plugin cannot be loaded for module "QtLocation": Cannot load library C:\Qt\Qt5.13.1\5.13.1\mingw73_32\qml\QtLocation\declarative_locationd.dll: Not enough memory resources are available to process this command. 

    My app was compiled for 32bit)))
    I have compiled for 64 and it works ok.

  • Lifetime Qt Champion


    How much memory does your application currently use ?
    What version of Qt are you using ?

  • @brmisha said in Application falls after adding QtLocation to QML:

    what are relations between your QQuickWidget and MainWindow?

Log in to reply