Results 1 to 3 of 3

Thread: Qt Access Point Name

  1. #1
    Join Date
    Mar 2016
    Posts
    1
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Qt Access Point Name

    Hi,

    Im using Qt 5.5 in Windows, i have a program that shows the ff:

    IP ADDRESS - "10.24.119.22"
    WIFI CONNECTION - "10.24.200.39"

    using this QT codes
    Qt Code:
    1. QList<QHostAddress> list = QNetworkInterface::allAddresses();
    2. QHostInfo info;
    3. QString qstr = info.localDomainName();
    4. qDebug() << qstr;
    5. for(int nIter=0; nIter<list.count(); nIter++)
    6.  
    7. {
    8. if(!list[nIter].isLoopback())
    9. if (list[nIter].protocol() == QAbstractSocket::IPv4Protocol )
    10. qDebug() << list[nIter].toString();
    11.  
    12.  
    13. }
    To copy to clipboard, switch view to plain text mode 
    is there a way that instead of showing the "address" the project will show the "Access Point Name" of the WLAN?

    can somebody help me with this.

    Thank you
    Last edited by anda_skoa; 10th March 2016 at 15:08. Reason: missing [code] tags

  2. #2
    Join Date
    Dec 2009
    Location
    New Orleans, Louisiana
    Posts
    791
    Thanks
    13
    Thanked 153 Times in 150 Posts
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: Qt Access Point Name

    QNetworkInterface::humanReadableName() will return the name of the interface that is configured in the control panel, but I don't know how you can actually get the SSID name.

    Is the SSID shown when you do a ipconfig command from the command line? (I don't use windows) If it is shown, you could run ipconfig in a QProcess and read the output and find the SSID name, etc. If it's not shown, I don't know you you could determine the SSID, it's certainly not part of QNetworkInterface's functionality.
    I write the best type of code possible, code that I want to write, not code that someone tells me to write!

  3. #3
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Qt Access Point Name

    There might also be some operating system API to get that information.

    Cheers,
    _

Similar Threads

  1. QTcpSocket on Symbian (access point required)
    By dmartino in forum Qt Programming
    Replies: 1
    Last Post: 14th May 2011, 09:52
  2. Select Access point And Connect internet for QNetwork S60
    By nhs_0702 in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 3rd June 2010, 04:10
  3. Replies: 1
    Last Post: 3rd December 2009, 15:23
  4. display a plot point by point
    By oswalidos in forum Newbie
    Replies: 32
    Last Post: 13th March 2009, 16:37

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.