Just taking code written for windows (with it's #include windows.h blah blah blah) and trying to make it compile for Linux involves a whole lot of work.
One benefit of Qt framework is that it provides abstract interfaces that can be used on multiple platforms.
The implementation of Qt uses OS-specific API "under the hood" so that we don't have to.