×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Apr 2010
    Location
    Fortaleza, Brazil
    Posts
    118

    'QNetworkConfigurationManager' was not declared in this scope

    Hi all!

    I'm trying to write a very small app that uses QNetworkConfigurationManager. It builds for the simulator, but I receive the error below while building for Symbian:
    Code:
    'QNetworkConfigurationManager' was not declared in this scope
    I have in my source code:
    Code:
    #include <QNetworkConfiguration>
    #include <QNetworkConfigurationManager>
    Here's the .PRO file:
    Code:
    QT       += core gui network
    
    TARGET = Launcher
    TEMPLATE = app
    
    SOURCES += main.cpp\
            mainwindow.cpp
    
    HEADERS  += mainwindow.h
    
    FORMS    += mainwindow.ui
    
    CONFIG += mobility
    MOBILITY += bearer
    
    symbian {
        TARGET.UID3 = 0xe7e05ecc
        TARGET.EPOCSTACKSIZE = 0x14000
        TARGET.EPOCHEAPSIZE = 0x020000 0x800000
        TARGET.CAPABILITY+="NetworkServices"
    }
    I also tried to remove bearer from MOBILITY, but it didn't help.

    Any advice?

  2. #2
    Regular Contributor
    Join Date
    Apr 2010
    Location
    Fortaleza, Brazil
    Posts
    118

    Re: 'QNetworkConfigurationManager' was not declared in this scope

    More information: Windows XP, Nokia Qt SDK (just run the updater, could not find anything new).
    I'm downloading Qt SDK 1.1 RC now to see if it helps.

  3. #3
    Regular Contributor
    Join Date
    Apr 2010
    Location
    Fortaleza, Brazil
    Posts
    118

    Re: 'QNetworkConfigurationManager' was not declared in this scope

    Well, it didn't help at all: I still get the same error, but it takes a lot longer to compile it!

    I also tried to follow the tips in the how to use QNetworkConfigurationManager to handle access point wiki article, but adding QTM_USE_NAMESPACE just caused more compilation errors. Then I found article Opening a network connection in Qt, which seems to be more up-to-date and, thanks to it, my app is now compiling. I had to add the lines below to my header file:
    Code:
    #include <qnetworkinterface.h> // have to be "QT += network" in pro file
    #include <qnetworkconfigmanager.h>
    #include <qnetworksession.h>

  4. #4
    Nokia Developer Champion
    Join Date
    Dec 2008
    Posts
    2,355

    Re: 'QNetworkConfigurationManager' was not declared in this scope

    I checked your post#1 its working , i am not getting any error.
    1. remove all the header file and check
    2. check the Qt version you are building for
    3. add these headers
    Code:
    #include <QNetworkAccessManager>
    #include <QtNetwork>

  5. #5
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: 'QNetworkConfigurationManager' was not declared in this scope

    Most likely the Qxxx files that are supposed to be in your epoc/include directory are missing.

    You should never need to directly use the small-qxxx.h header files.

Similar Threads

  1. error: 'QSensor' was not declared in this scope
    By mextil in forum [Archived] Qt Mobility Project
    Replies: 5
    Last Post: 2011-08-03, 14:52
  2. QSystemInfo was not declared in this scope
    By sukumark123 in forum [Archived] Qt Mobility Project
    Replies: 3
    Last Post: 2010-12-21, 01:22
  3. Replies: 1
    Last Post: 2010-12-10, 04:53
  4. Replies: 4
    Last Post: 2010-08-03, 12:22
  5. Replies: 1
    Last Post: 2010-07-06, 12:04

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×