Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5839479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T11:35:24+00:00 2026-05-22T11:35:24+00:00

I am trying to compile: http://wiki.forum.nokia.com/index.php/Fetching_a_map_tile_in_Qt_using_Google_Maps I am using Qt-Mobility 1.2 with Qt 4.7

  • 0

I am trying to compile: http://wiki.forum.nokia.com/index.php/Fetching_a_map_tile_in_Qt_using_Google_Maps

I am using Qt-Mobility 1.2 with Qt 4.7 on OpenSuse 11.2

The errors I am receiving are:

MainWindow.h:7: error: ‘QtMobility’ is not a namespace-name
MainWindow.h:7: error: expected namespace-name before ‘;’ token
MainWindow.h:10: error: expected class-name before ‘{’ token
In file included from /opt/qtsdk-2010.05/qt/include/QtCore/qcoreapplication.h:47,
                 from /opt/qtsdk-2010.05/qt/include/QtGui/qapplication.h:45,
                 from /opt/qtsdk-2010.05/qt/include/QtGui/QApplication:1,
                 from main.cpp:2:
/opt/qtsdk-2010.05/qt/include/QtCore/qeventloop.h:51: error: expected initializer before ‘QtCoreModule’
make: *** [main.o] Error 1

My .pro file contains:

TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .

HEADERS += MainWindow.h
SOURCES += main.cpp MainWindow.cpp

QT += network
CONFIG += mobility
MOBILITY = location

The error is reported in the header file, which I have shown as follows:

#include <QtNetwork/QNetworkAccessManager>
#include <QtNetwork/QNetworkReply>
#include <QPaintEvent>
#include <QPixmap>

using namespace QtMobility;

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow ();
    void paintEvent(QPaintEvent* paintEvent);

public slots:
    void handleNetworkData(QNetworkReply* reply);

private:
    void fetchMap(const QSize& size, qreal latitude, qreal longitude);

private:
    QNetworkAccessManager networkAccessManager;
    QPixmap mapPixmap;
}

Please guide.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T11:35:25+00:00Added an answer on May 22, 2026 at 11:35 am

    You’ll need to include at least one QtMobility header to be able to use that namespace.

    Also that using namespace declaration is not the recommended way anymore. Use:

     QTM_USE_NAMESPACE
    

    instead (see QtMobility QuickStart).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When trying to compile the following file in xcode: http://openkinect.org/wiki/C%2B%2BOpenCvExample I get these errors:
I'm trying to compile vlc using the following instructions http://wiki.videolan.org/AndroidCompile . i get the
I'm trying to compile Q4M ( http://q4m.31tools.com ) for MySql 5.1.44 since there is
I am trying to compile VRip in Ubuntu 10.04, using the site http://graphics.stanford.edu/software/vrip/guide/ as
I'm trying to compile XJig ( http://sourceforge.net/projects/xjig/ ) for Snow Leopard and getting errors:
Am trying to run the following python program import re regex=re.compile(http...imgs.xkcd.com.comics.[\\S]*.[jpg|png]) f=open('out.txt') for a
I am trying to compile the java class on: http://wiki.eclipse.org/Jetty/Tutorial/Jetty_HelloWorld with Jetty web service.
I'm trying to compile a C program, with these headers: http://pastebin.com/SppCXb0U , on Ubuntu.
I'm trying to compile the oauth-utils http://mir.dnsalias.com/oss/oauth/start for Windows from Ubuntu. I have compiled
I am just trying to compile this simple example : http://msdn.microsoft.com/en-us/library/ms533895(VS.85).aspx what needs to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.