封装一些常用的 win api

    1. // 返回资源管理当前打开的文件夹地址
    2. static QString getExplorerCurrentPath();
    3. // 返回资源管理当前打开的所有文件夹地址
    4. static QStringList getExplorerALLPath();
    5. /* *ShellExecuteExW 执行,省去编码转换,运行后返回hInstApp的结果。
    6. path 路径
    7. arameters 参数
    8. directory 程序目录
    9. runas 是否管理员
    10. */
    11. static int VShellExecuteExW(const QString &path, const QString &parameters = QString(), const QString &directory = QString(), bool runas = false);
    12. // 设置或者取消 窗体置顶,内置了QT自带的方法和 win32 api 两种方式
    13. static void setWindowStaysOnTop( QWidget *widget, bool bTop, bool useWinApi = false );
    14. // 鼠标穿透 鼠标的点击将穿过界面 到后面的窗口
    15. static void setWindowThrough( QWidget *widget, bool bThrough = true );