2019年1月23日

QT 执行windows cmd 命令并读取结果

摘要: 1,写好命令, 2,用QProcess执行,等待完成(有超时), 3,读取结果 注意形如“Program Files”的有 空格 的路径,要加上双引号。 阅读全文

posted @ 2019-01-23 16:42 liujx2019 阅读(2925) 评论(0) 推荐(0) 编辑

Qt5 escape spaces in path

摘要: There are two possible ways. You can either use escaped quotes (inserting the string between quotes) : Or use the QStringList() overload of start whic 阅读全文

posted @ 2019-01-23 16:41 liujx2019 阅读(227) 评论(0) 推荐(0) 编辑

获取磁盘的 总容量,空余容量,已用容量 【windows】

摘要: 使用windows api 输入:盘符字符串 输出:磁盘容量 注意其中的字符数组 dir 一定要以'\0'结尾,否则程序时好时坏,因为有时dir末尾正好是0,而有时不是。 阅读全文

posted @ 2019-01-23 16:40 liujx2019 阅读(405) 评论(0) 推荐(0) 编辑

通过进程名称,获取其路径

摘要: 使用windows api 此处要轮询每个进程,稍微费时,不适合几秒钟就做一次的情况 阅读全文

posted @ 2019-01-23 16:39 liujx2019 阅读(294) 评论(0) 推荐(0) 编辑

C++ Windows - How to get process path from its PID

摘要: 出处 https://stackoverflow.com/questions/1933113/c-windows-how-to-get-process-path-from-its-pid 注意质疑(我也没试过): 1 most of modules turn to a failure in gett 阅读全文

posted @ 2019-01-23 16:38 liujx2019 阅读(777) 评论(0) 推荐(0) 编辑

QT 无法抓住异常

摘要: 出处:https://stackoverflow.com/questions/40980171/qt5core-dll-crashing I've found that enabling /EHa (Structured Exception Handling) on the compiler sol 阅读全文

posted @ 2019-01-23 16:37 liujx2019 阅读(1333) 评论(0) 推荐(0) 编辑

设置共享内存大小 【windows】

摘要: hMapFile = CreateFileMapping( INVALID_HANDLE_VALUE, // use paging file NULL, // default security PAGE_READWRITE, //... 阅读全文

posted @ 2019-01-23 16:36 liujx2019 阅读(1383) 评论(0) 推荐(1) 编辑

How to use QueryPerformanceCounter? (c++,不使用 .Net)

摘要: 出处:https://stackoverflow.com/questions/1739259/how-to-use-queryperformancecounter 参考:https://docs.microsoft.com/zh-cn/windows/desktop/WmiSdk/accessing 阅读全文

posted @ 2019-01-23 16:35 liujx2019 阅读(278) 评论(0) 推荐(0) 编辑

c++ 更新 performance counter 数据,错误码 87

摘要: ERROR_INVALID_PARAMETER 87 (0x57) The parameter is incorrect. 很可能是该送 ULONG 的送了 ULONGLONG,vise versa ERROR_INVALID_PARAMETER 87 (0x57) The parameter is 阅读全文

posted @ 2019-01-23 16:35 liujx2019 阅读(226) 评论(0) 推荐(0) 编辑

点击 QTableView,触发事件

摘要: Here is an example of how you can get a table cell's text when clicking on it. Suppose a QTableView defined in some MyClass class. You need to connect 阅读全文

posted @ 2019-01-23 16:33 liujx2019 阅读(4278) 评论(2) 推荐(1) 编辑

导航