Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Application falls after adding QtLocation to QML
Forum Updated to NodeBB v4.3 + New Features

Application falls after adding QtLocation to QML

Scheduled Pinned Locked Moved Solved QML and Qt Quick
5 Posts 3 Posters 642 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    BrMisha
    wrote on last edited by
    #1

    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:
    main:

    QApplication a(argc, argv);
    
    MainWindow w;
    w.show();
    
    QQuickWidget	*wq = new QQuickWidget();
    wq->setResizeMode(QQuickWidget::SizeRootObjectToView);
    wq->setSource(QUrl(QStringLiteral("../appp/user_windows/map/userwindowmap.qml")));
    wq->show();
    
    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)))

    1 Reply Last reply
    0
    • B Offline
      B Offline
      BrMisha
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • B Offline
        B Offline
        BrMisha
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by SGaist
          #4

          Hi,

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

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • V Offline
            V Offline
            vladstelmahovsky
            wrote on last edited by
            #5

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

            what are relations between your QQuickWidget and MainWindow?

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved