Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Problem in getting system domain or connected workgroup name.
Qt 6.11 is out! See what's new in the release blog

Problem in getting system domain or connected workgroup name.

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 3.4k 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.
  • M Offline
    M Offline
    M_31
    wrote on last edited by
    #1

    I want to get my system domian name or my local network connected domain name or work group name.
    I used the following code to get the same .. but its always returning empty string ""

    Please let me know whether i am doing anything wrong on this.

    @
    QHostInfo::localDomainName();
    @

    1 Reply Last reply
    0
    • L Offline
      L Offline
      lgeyer
      wrote on last edited by
      #2

      [quote]QString QHostInfo::localDomainName () [static]

      Returns the DNS domain of this machine.
      Note: DNS domains are not related to domain names found in Windows networks.[/quote]

      As far as I know you will have to resort to platform-specific code, like "NetWkstaGetInfo":http://goo.gl/TD0mL.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        M_31
        wrote on last edited by
        #3

        Thanks Lukas..for your valuable inputs.

        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