It really depends a lot on the reason for wanting a unique id. If you want something that is unique between runs, or to implement some sort of hardware locking then you definitely need to hit the OS APIs and think hard about how someone might subvert it. Also consider who is running it; hardware information is not, in my experience, reliably accessible to unprivileged users on Windows Vista.

If you just need an identifier that is globally unique for the life of your running process then use a QUuid. There's a very, very slight chance it won't be unique in a few hundreds of machines.