How to grant administrator privileges to Windows applications with CMake

administrator_privileges_uac

Sometimes happens that you need grant administrator privileges to Windows applications because you need to access to some kind of hardware feature, launch a child process within your application or anything else. Otherwise, your application will not be able to perform these actions.

For that, you need to create a manifest file in which you have to indicate that you application should ask the user for administrator privileges and, after that, embed the file in your application executable.

If you are also using CMake and you want to include all this tricky stuff in your build process, keep reading.

Continue reading “How to grant administrator privileges to Windows applications with CMake”

Tweet about this on Twitter0Share on Facebook0Share on Google+0Share on LinkedIn0Buffer this pageEmail this to someonePrint this page

Zipping and unzipping files with Qt

zip_and_qt

If you want to zip and unzip files within your Qt application, you will discover a world of pain in front of you >_<

The only two functions that the Qt library includes to compress an uncompress data are qCompress and qUncompress, both part of the QByteArray class.

The problem is that they use a format not compatible with external applications like WinZIP, WinRAR or 7-Zip, which means that if you try to use these functions with a normal ZIP file, you will probably get an error like this:

But do not worry! There is a way to resolve this problem! ^_^

Continue reading “Zipping and unzipping files with Qt”

Tweet about this on Twitter0Share on Facebook12Share on Google+0Share on LinkedIn6Buffer this pageEmail this to someonePrint this page