会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Azuki_op
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
8
9
10
11
12
13
下一页
2021年7月17日
QTableWidget 使用
摘要: ui->tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows);//选中一行 ui->tableWidget->setSelectionMode(QAbstractItemView::ExtendedSelection);//
阅读全文
posted @ 2021-07-17 22:02 Azuki_op
阅读(277)
评论(0)
推荐(0)
2021年7月16日
QT中inherits()函数可 判断一个对象的类是不是从另外一个类继承而来
摘要: 函数原型 bool QObject::inherits ( const char * lname ) const //来自官方文档 QTimer *timer = new QTimer; // QTimer inherits QObject timer->inherits("QTimer"); //
阅读全文
posted @ 2021-07-16 01:41 Azuki_op
阅读(1039)
评论(0)
推荐(0)
Linux环境crontab 定时任务
摘要: 安装crontab: yum install crontabs crontab服务操作说明: /sbin/service crond start //启动服务 /sbin/service crond stop //关闭服务 /sbin/service crond restart //重启服务 /sb
阅读全文
posted @ 2021-07-16 01:29 Azuki_op
阅读(76)
评论(0)
推荐(0)
读取XML配置
摘要: #include <QtXml> private: const QString CONFIG_PATH = "./config.xml"; const QString UDP_STR = "udp"; const QString TCP_STR = "tcp"; const QString SQL_
阅读全文
posted @ 2021-07-16 01:14 Azuki_op
阅读(69)
评论(0)
推荐(0)
单例模式
摘要: 单例模式:: 只实例化一次对象 分为饿汉式单例类和懒汉式单例类。 一般结合工厂模式使用 优点: 1.减少了时间和空间的开销(new) 2.提高了封装性,使得外部不易改动实例 单线程中: Singleton* getinstance() { if(instance == NULL) { instanc
阅读全文
posted @ 2021-07-16 01:08 Azuki_op
阅读(28)
评论(0)
推荐(0)
文本操作防止中文乱码
摘要: int main { QTextCodec *codec = QTextCodex::codexForName("UTF-8"); QTextCodec::setCodeForLocale(codec); QTextCodec::setCodeForCStrings(codec); QTextCod
阅读全文
posted @ 2021-07-16 01:02 Azuki_op
阅读(135)
评论(0)
推荐(0)
windows环境下根据进程名杀死进程 并重新拉起
摘要: #include <Tlhelp32.h> #include <windows.h> #include <tlhelp32.h> #include "psapi.h" #include <Tlhelp32.h> void terminateMYSQL() { HANDLE hSnapShot=Cre
阅读全文
posted @ 2021-07-16 00:56 Azuki_op
阅读(776)
评论(0)
推荐(0)
Linux 监测程序且宕机重启
摘要: #!/bin/sh command="/usr/local/Presto/presto-server-0.100/bin/launcher run" #路径 appname=presto-server #进程名 logfile=/usr/local/log/presto_monitor.log #l
阅读全文
posted @ 2021-07-16 00:52 Azuki_op
阅读(281)
评论(0)
推荐(0)
QT 加入组播操作
摘要: #include <math.h> #include <QSqlDatabase> #include <QSqlQuery> #include <QSqlError> #include <QNetworkAddressEntry> #include <QNetworkInterface> priva
阅读全文
posted @ 2021-07-16 00:46 Azuki_op
阅读(901)
评论(0)
推荐(0)
使用QProcess 完成linux关机
摘要: void Parse::sysshutdown() { // Mymethod::record(QString("Switch machine message received")); QProcess *parent; QString program = "sudo"; QStringList a
阅读全文
posted @ 2021-07-16 00:33 Azuki_op
阅读(216)
评论(0)
推荐(0)
上一页
1
···
8
9
10
11
12
13
下一页
公告