Results 1 to 4 of 4

Thread: Get the product/device name using QT library?

  1. #1
    Join Date
    Jan 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Get the product/device name using QT library?

    Hi,

    I am using QT4.6, trying to write an application that will run on windows and linux.
    I am able to get the network interfaces and its associated MAC address in both windows and linux using QNetworkInterface functions.
    Is there a way to get the product name for the network interface as well using QT?

    e.g for linux, i can get wlan0,
    is there a way to get its product/device name --> AR928X Wireless Network Adapter (PCI-Express) [168c:002a] or something similar?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Get the product/device name using QT library?

    Qt has no facilities to do that.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Get the product/device name using QT library?

    Under Linux, you can parse /proc if it's mounted. I don't know of other ways.

    Under Windows you can use SetupDi* functions (GetClassDevs, EnumDeviceInterfaces, EnumDeviceInfo, etc).

    I don't know of any portable way of doing it.

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Get the product/device name using QT library?

    I am able to get the network interfaces and its associated MAC address in both windows
    You might want to check that the MAC returned on Windows Vista/7 when running as an unprivileged user is the real MAC, and not just a random return, if that is important to you. Some hardware locking schemes using the MAC fall foul of this when the "MAC" changes.

Similar Threads

  1. Replies: 1
    Last Post: 11th July 2010, 14:52
  2. Amazon Product Advertising API - Signed requests
    By youkai in forum General Programming
    Replies: 2
    Last Post: 13th July 2009, 12:39
  3. Replies: 5
    Last Post: 5th June 2009, 11:07
  4. Hardware info and product serials
    By uygar in forum Qt Programming
    Replies: 1
    Last Post: 10th November 2008, 19:12

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.