Using QT Creator how can I set the execution level as requireAdministrator

前端 未结 3 1711
别跟我提以往
别跟我提以往 2021-01-06 20:10

Basically I need to be able to edit files that require administrator privileges to edit. I know that in Visual Studio a manifest file is used for this - but I understand QT

3条回答
  •  长发绾君心
    2021-01-06 20:53

    GimbleJune 29, 2012 at 8:59 AM Just to add another less-intrusive way with VS2010 and Qt4.8+, from http://www.qtcentre.org/threads/29107-win32-how-to-modify-the-manifest-with-qmake

    win32 {
    CONFIG += embed_manifest_exe
    QMAKE_LFLAGS_WINDOWS += /MANIFESTUAC:level=\'requireAdministrator\'
    }
    

    That works for a minimal case (just requiring administrative rights)

    Still works on Qt 5.6 and MSVC 2015.

提交回复
热议问题