View Single Post
Posts: 16 | Thanked: 18 times | Joined on Sep 2010
#7
Originally Posted by scottrNZ View Post
I'm using a QNetworkAccessManager object to fire off GET requests, however I find that if the device does not have a network connection it automatically connects to my 3G provider. What I'd like is to have it pop up the standard internet connection selection window to allow the user to select the internet access point to use.
This depends on user settings. If the user has disabled the connect automatically, then the dialog is shown.

However you can request the connection dialog via D-Bus.

Qt code (I haven't tried this):
PHP Code:
#include <icd/dbus_api.h>

static QDBusConnection dBusConnection QDBusConnection::systemBus();

ICD::ICD(QObject *parent)
    : 
QObject(parent)
{
    
QDBusInterface *dBusInterface = new QDBusInterface(ICD_DBUS_API_INTERFACEICD_DBUS_API_PATH,
                                       
ICD_DBUS_API_INTERFACEdBusConnection);
                                       
    
//From dbus_api.h: Request the 'Select connection' dialog; 
    //Only connectiviy UIs should be using this function.
    
dBusInterface->call(ICD_DBUS_API_SELECT_REQ,
                        
QVariant((unsigned int)ICD_CONNECTION_FLAG_USER_EVENT));

 

The Following User Says Thank You to laitiju For This Useful Post: