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. [Solved][By using alternative] How to get Windows UUID?
Forum Updated to NodeBB v4.3 + New Features

[Solved][By using alternative] How to get Windows UUID?

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 2.5k 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.
  • S Offline
    S Offline
    slumberdin
    wrote on last edited by
    #1

    Can someone teach me on how to use QUuid ?
    I already tried multiple times using GUID.
    I simply doesn't really understand the explaination in the documentation.
    I tried to find example using the 'Search' button on the right top, but I don't get any example on how to use GUID really well.
    Hope you can help me.
    Thanks in advance.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andreyc
      wrote on last edited by
      #2

      UUID is "Universally Unique Identifier":http://qt-project.org/doc/qt-5/quuid.html#details

      In the simplest case whenever you need to identify something uniquely you call
      @
      QUuis id = QUuid::createUuid();
      @
      and then use that id.
      It can be a key in a QMap or QHash

      If you need a string with uuid that looks like "67C8770B-44F1-410A-AB9A-F9B5446F13EE" then
      @
      QString id = QUuid::createUuid().toString();
      @
      And again use that id string.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        slumberdin
        wrote on last edited by
        #3

        Thanks for your explaination.
        Yes, I understand on that part on how to create by using QUuid.

        But, in my case, I want to get my Windows UUID.
        I notice that in the QUuid have a function get the UUID using

        @
        QUuid::operator GUID() const
        @

        In what way I can use the GUID?
        Because the function does not return any datatype.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          slumberdin
          wrote on last edited by
          #4

          Maybe you guys can ignored this post.
          I already get the serial number of the pc by using QProcess. :)

          1 Reply Last reply
          0
          • A Offline
            A Offline
            andreyc
            wrote on last edited by
            #5

            Glad you solved it.

            Microsoft uses UUID to generate Windows serial numbers.
            It is not possible to read Windows serial number using QUuid.

            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