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

Generating GUID

Scheduled Pinned Locked Moved General and Desktop
8 Posts 7 Posters 23.2k Views
  • 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 19 Sept 2011, 10:22 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 19 Sept 2011, 10:24 last edited by
      #2

      @QUuid::createUuid ()@ static member

      1 Reply Last reply
      1
      • I Offline
        I Offline
        Indrajeet
        wrote on 19 Sept 2011, 10:53 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 19 Sept 2011, 11:00 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 19 Sept 2011, 11:22 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 15 Dec 2012, 19:30 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 15 Dec 2012, 23:06 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 12 Dec 2013, 03:54 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

                  • Login

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