Generating GUID
-
wrote on 19 Sept 2011, 10:22 last edited by
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.
-
wrote on 19 Sept 2011, 10:24 last edited by
@QUuid::createUuid ()@ static member
-
wrote on 19 Sept 2011, 10:53 last edited by
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? -
wrote on 19 Sept 2011, 11:00 last edited by
The documentation does not say that this functionality is windows-only, does it?
-
wrote on 19 Sept 2011, 11:22 last edited by
well i have to agree to andre. and i also use it on windows. so it works
-
wrote on 15 Dec 2012, 19:30 last edited by
-
wrote on 15 Dec 2012, 23:06 last edited by
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() ???
-
wrote on 12 Dec 2013, 03:54 last edited by
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.