So I realize that I have to use GUI libraries to make applicatiOns with a GUI because c++ has no standard way of doing this. So if c++ has no build in way of making gui's then how are these libraries such as QT, gtk, or wxwidgets made in the first place?
Well some of them can wrap the OS's GUI. Windows has it's own, and I believe that POSIX systems have their own as well. Since I can't speak for any of the toolkit's out there, I can explain (somewhat) how a Windows GUI could work, for example.
The Windows OS has certain DLLs that specify information about a program. Some of them are for keyboard/mouse input, some of them are for window positioning, some of them are for movement. Some of these toolkits can use those DLLs and create a wrapper, if you will, that enables C++ to interact with them and send the correct information.
There is a lot of thought that goes into these toolkits, and obviously they know more about how to do this than either me or you do. Some can even write their own DLLs. Most of these projects have been going on for several years with a large number of people contributing. Some more advanced than others. QT's toolkit was paid for by Nokia and it kept expanding to meet their needs. Since they wanted to allow developers to make software for their stuff, they made it open source, and it kept expanding. Now QT is a very large language that covers so many OS's it's unreal.
Personally, I don't like QT because it doesn't "feel" like C++ anymore.