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. Generating GUID
Qt 6.11 is out! See what's new in the release blog

Generating GUID

Scheduled Pinned Locked Moved General and Desktop
9 Posts 8 Posters 24.3k 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.
  • I Offline
    I Offline
    Indrajeet
    wrote on last edited by
    #1

    Hi All

    I want to generate GUID in QT?
    Can anyone tell me please how to generate it.

    I went through the QUuid class but here we have to pass all the parameters to generate GUID.

    1 Reply Last reply
    0
    • J Offline
      J Offline
      Jupiter
      wrote on last edited by
      #2

      @QUuid::createUuid ()@ static member

      1 Reply Last reply
      1
      • I Offline
        I Offline
        Indrajeet
        wrote on last edited by
        #3

        Hi Nazgul

        THanks for reply.

        But this is not for windows,I want to do it in windows platform & at runtime i want to generate it.
        So how to do that?

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          The documentation does not say that this functionality is windows-only, does it?

          1 Reply Last reply
          0
          • J Offline
            J Offline
            Jupiter
            wrote on last edited by
            #5

            well i have to agree to andre. and i also use it on windows. so it works

            1 Reply Last reply
            0
            • E Offline
              E Offline
              ExtraLeonard
              wrote on last edited by
              #6

              Try this:
              http://www.guidgenerator.com/online-guid-generator.aspx

              1 Reply Last reply
              0
              • M Offline
                M Offline
                MuldeR
                wrote on last edited by
                #7

                If you just need to generate GUID's, there is a small tool "guidgen.exe" included with the Windows SDK.

                And if you want to do it programmatically via Win32 API, instead of QUuid, you can use the CoCreateGuid().

                http://msdn.microsoft.com/de-de/library/windows/desktop/ms688568(v=vs.85).aspx

                Still I don't understand what is wrong with QUuid::createUuid() ???

                My OpenSource software at: http://muldersoft.com/

                Qt v4.8.6 MSVC 2013, static/shared: http://goo.gl/BXqhrS

                Go visit the coop: http://youtu.be/Jay...

                1 Reply Last reply
                0
                • H Offline
                  H Offline
                  hatfarm
                  wrote on last edited by
                  #8

                  I believe he was just thrown off by the way that is written in the documentation.

                  The first line of the QUuid::createUuid() is:

                  "On any platform other than Windows, this function returns a new UUID with variant QUuid::DCE and version QUuid::Random."

                  However, at the end it says that on Windows it will create a GUID, so you should be getting what you want with that.

                  1 Reply Last reply
                  1
                  • B Offline
                    B Offline
                    BrunoVT1992
                    Banned
                    wrote on last edited by BrunoVT1992
                    #9
                    This post is deleted!
                    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