代码改变世界

随笔分类 -  program

qt程序在Linux环境下写入系统日志及做成服务

2024-07-17 12:05 by @学无止境, 82 阅读, 收藏, 编辑
摘要: 一、将日志写入linux系统日志 1、添加头文件 #include <syslog.h> 2、写入日志 QString log="log to write"; syslog(LOG_INFO,"%s",log.toStdString().c_str()); 二、将qt控制后程序做成linux服务 参 阅读全文

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),选择其他项目 阅读全文

gdialog

2024-03-11 09:01 by @学无止境, 12 阅读, 收藏, 编辑
摘要: #! /bin/sh #gdialog --title "Question" --msgbox "Welcometo my survey" 9 18 gdialog --title "Confirm" --yesno "Are you willing to take part?" 9 18 #ech 阅读全文
点击右上角即可分享
微信分享提示