Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Question about Qt Location
QtWS25 Last Chance

Question about Qt Location

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 668 Views
  • 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.
  • M Offline
    M Offline
    Marek
    wrote on last edited by
    #1

    Hi all,

    I need to display map in new application window,
    -- be able to provide address
    -- zoom to location
    -- manually set a few markers
    -- plot the route
    -- mark current location (from gps) in relation to route
    -- take gps coordinates from markers.

    I have read somewhere that I can't interact with map from C++ so this must be in QML.
    My application is in C++, but in some other app I have connected signals from QML to C++ like this:

        view = new QQuickWidget(ui->scanPage);
        ui->scanPageLayout->addWidget(view);
        ui->scanPageLayout->setMargin(0);
        view->setSource(QUrl("qrc:/declarative-camera.qml"));
        view->show();
    
        QQuickItem *root=view->rootObject();
        filter = root->findChild<QObject*>("zxingFilter");
        QObject::connect(filter, SIGNAL(tagFound(QString)),this, SLOT(tagFound(QString)));
        controls=root->findChild<QObject*>("closeButton");
        QObject::connect(controls,SIGNAL(closeScan()),this,SLOT(closeScan()));
    

    Can this approach work with Qt Location?
    Meaning the app is in C++ and I'm using one page of QStackedWidget to display and manipulate the map

    I know that these are vague questions ;)

    Best Regards
    Marek

    ? 1 Reply Last reply
    0
    • M Marek

      Hi all,

      I need to display map in new application window,
      -- be able to provide address
      -- zoom to location
      -- manually set a few markers
      -- plot the route
      -- mark current location (from gps) in relation to route
      -- take gps coordinates from markers.

      I have read somewhere that I can't interact with map from C++ so this must be in QML.
      My application is in C++, but in some other app I have connected signals from QML to C++ like this:

          view = new QQuickWidget(ui->scanPage);
          ui->scanPageLayout->addWidget(view);
          ui->scanPageLayout->setMargin(0);
          view->setSource(QUrl("qrc:/declarative-camera.qml"));
          view->show();
      
          QQuickItem *root=view->rootObject();
          filter = root->findChild<QObject*>("zxingFilter");
          QObject::connect(filter, SIGNAL(tagFound(QString)),this, SLOT(tagFound(QString)));
          controls=root->findChild<QObject*>("closeButton");
          QObject::connect(controls,SIGNAL(closeScan()),this,SLOT(closeScan()));
      

      Can this approach work with Qt Location?
      Meaning the app is in C++ and I'm using one page of QStackedWidget to display and manipulate the map

      I know that these are vague questions ;)

      Best Regards
      Marek

      ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      @Marek said in Question about Qt Location:

      Can this approach work with Qt Location?

      Yes, no problem.

      1 Reply Last reply
      1
      • M Offline
        M Offline
        Marek
        wrote on last edited by
        #3

        And how about map itself is it better to use Open Street Map, or get api key from Google and use google map ?
        Can I do everything just in Qt, or use some SDK like developers.arcgis.com according to this video:
        QtDD14 -Developing Great Location-based Apps with QML

        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