摘要:
一、将日志写入linux系统日志 1、添加头文件 #include <syslog.h> 2、写入日志 QString log="log to write"; syslog(LOG_INFO,"%s",log.toStdString().c_str()); 二、将qt控制后程序做成linux服务 参 阅读全文
随笔分类 - program
qt code format style
2024-06-18 08:38 by @学无止境, 12 阅读, 收藏, 编辑
摘要:
参考:https://www.cnblogs.com/ybqjymy/p/18003463 帮助-->关于插件 把clang-format.exe 放在D:\Q5.15\Tools\QtCreator\bin\clang\bin目录下 {BasedOnStyle: Google,AccessModi 阅读全文
char* []
2024-03-21 10:44 by @学无止境, 9 阅读, 收藏, 编辑
摘要:
// strlen 不计'\0',sizeof 计'\0'(都查字节个数) char x[] = "abcdefg中中"; char y[] = { 'a','b','c','d','e','f','g','中','\0' }; cout << "length x-->" << strlen(x) 阅读全文
C++ pointer
2024-03-18 12:07 by @学无止境, 2 阅读, 收藏, 编辑
摘要:
int* pInt = new int; *pInt = 5; cout << " " << endl; cout << "&(*pInt)-->" << &(*pInt) << endl; cout << "pInt-->" << pInt << endl; cout << "&pInt-->" 阅读全文
Qt 自定义控件
2024-03-11 18:01 by @学无止境, 297 阅读, 收藏, 编辑
摘要:
参考: https://blog.csdn.net/danshiming/article/details/134383612 https://blog.csdn.net/u011832219/article/details/128531359 1、创建自定义控件 新建qt项目(项目1),选择其他项目 阅读全文