Results 1 to 6 of 6

Thread: Qt network access manager

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2011
    Location
    INDIA
    Posts
    18
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Qt network access manager

    Hi,
    I want to implement fortune server/client example on a different IP. Well I changed the code which finds the IP Addr with this one.

    Qt Code:
    1. QString ipAddress="10.0.0.132";
    2. QHostAddress(QHostAddress("10.0.0.132") );
    To copy to clipboard, switch view to plain text mode 

    and in network access manager


    Qt Code:
    1. QNetworkConfigurationManager manager;
    2. if (manager.capabilities() & QNetworkConfigurationManager::NetworkSessionRequired) {
    3. // Get saved network configuration
    4. QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
    5. settings.beginGroup(QLatin1String("QtNetwork"));
    6. const QString id = settings.value(QLatin1String("DefaultNetworkConfiguration")).toString();
    7. settings.endGroup();
    8.  
    9. // If the saved network configuration is not currently discovered use the system default
    10. QNetworkConfiguration config = manager.configurationFromIdentifier(id);
    11. if ((config.state() & QNetworkConfiguration::InternetAccessPoint) !=
    12. QNetworkConfiguration::InternetAccessPoint) {
    13. config = manager.defaultConfiguration();
    14. }
    15.  
    16. networkSession = new QNetworkSession(config, this);
    17. connect(networkSession, SIGNAL(opened()), this, SLOT(sessionOpened()));
    To copy to clipboard, switch view to plain text mode 


    I did the same in both server /client.
    it gave an error ::Cannot retrieve debugging output!

    Pls help me understand the problem
    Last edited by Arpitgarg; 22nd March 2011 at 08:50.

Similar Threads

  1. Replies: 1
    Last Post: 4th February 2011, 09:09
  2. access the network to read files
    By jaca in forum Newbie
    Replies: 3
    Last Post: 2nd March 2010, 13:00
  3. Download Manager Like IDM(Internet Download Manager)
    By sathiskumarmsk in forum Qt Programming
    Replies: 1
    Last Post: 27th July 2008, 15:52
  4. mapping manager
    By sreedhar in forum Qt Programming
    Replies: 6
    Last Post: 16th February 2007, 13:48

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.