Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Get local ip adress
Forum Updated to NodeBB v4.3 + New Features

Get local ip adress

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 7.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pascal95abc
    wrote on last edited by
    #1

    Hello,

    is there a way to get the local IP adress ?

    This "tool":http://betalabs.nokia.com/apps/nokia-connectivity-analyzer/more_info can do it
    and it seems to be made with the Qt Creator.

    !http://betalabs.nokia.com/sites/default/files/mjtasa/Diagnostics.png(Nokia's Connectivity Analyzer - interface)!

    Thank you

    Qt 4.7.3
    Symbian OS v9.4 / Symbian^1, S60 5th Edition
    on N97

    1 Reply Last reply
    0
    • L Offline
      L Offline
      leon.anavi
      wrote on last edited by
      #2

      I think that "QNetworkInterface::allInterfaces ()":http://qt-project.org/doc/qt-4.8/qnetworkinterface.html#allInterfaces can give you a list of IPs including 127.0.0.1.

      @
      QList<QHostAddress> list = QNetworkInterface::allAddresses();
      for(int nIter=0; nIter<list.count(); nIter++)
      {
      qDebug() << list[nIter].toString();
      }
      @

      Please find an example "here":http://www.developer.nokia.com/Community/Wiki/Getting_Host's_IP_addresses_and_Interfaces

      Edit: Sorry, I saw that the question is related to QML after publishing the post.

      http://anavi.org/

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved