会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
朱小勇
博客园
园子
首页
新随笔
联系
管理
订阅
上一页
1
···
53
54
55
56
57
58
59
60
61
···
133
下一页
2020年9月22日
js字符串去掉回车和空格
摘要: var str = text_name.replace(/\ +/g,""); str = str.replace(/[\r\n]/g,"");
阅读全文
posted @ 2020-09-22 13:39 朱小勇
阅读(2743)
评论(0)
推荐(0)
2020年9月13日
使用QtCreator来进行UML建模
摘要: 1、保证Qt安装了此功能的【反正安装的时候所有功能全选就肯定有这个功能】 2、打开QC,左上角文件->新建文件或项目,如下图选择 3、然后就是这样式儿的 官网介绍:https://doc.qt.io/qtcreator/creator-modeling.html
阅读全文
posted @ 2020-09-13 22:50 朱小勇
阅读(1859)
评论(0)
推荐(0)
2020年9月7日
Qt字符串转二维码字符串
摘要: QString toQRcode(const QString &plain) { /* Create the QR code */ QRCode qrcode; uint8_t qrcodeData[qrcode_getBufferSize(3)] = {0}; qrcode_initText(&q
阅读全文
posted @ 2020-09-07 23:47 朱小勇
阅读(456)
评论(0)
推荐(0)
C++10进制转16进制字符串互转
摘要: 1、10进制转16进制字符串 unsigned long long ullValue = 18446744073709551615; char buf[18] = {0}; sprintf(buf, "0x%llX", ullValue); // result: 0xFFFFFFFFFFFFFFFF
阅读全文
posted @ 2020-09-07 23:45 朱小勇
阅读(6855)
评论(3)
推荐(0)
Qt设置控件透明度
摘要: QSS中 QLabel { background-color: rgba(255, 255, 224, 50%); border: 2px solid black; } 0%表示全透明,100%表示不透明
阅读全文
posted @ 2020-09-07 16:07 朱小勇
阅读(1967)
评论(0)
推荐(0)
Qt在槽函数里判断是哪个对象触发的信号
摘要: 在槽函数里: QObject *QObject::sender() const 返回值是QObject指针,也就是触发者,可能是按钮,可能是定时器。 如何得到触发对象: QTimeEdit *editor = qobject_cast<QTimeEdit *>(sender()); QObject
阅读全文
posted @ 2020-09-07 10:00 朱小勇
阅读(1521)
评论(0)
推荐(0)
2020年9月5日
Qt求极值
摘要: 1. 求最大值 const T &qMax(const T &a, const T &b) 2. 求最小值 const T &qMin(const T &a, const T &b) 3.求中间值 const T &qBound(const T &v1, const T &v2, const T &
阅读全文
posted @ 2020-09-05 01:04 朱小勇
阅读(500)
评论(0)
推荐(0)
C++打印变量的类型
摘要: int result; std::cout << typeid(result).name(); 打印:int
阅读全文
posted @ 2020-09-05 00:58 朱小勇
阅读(5308)
评论(0)
推荐(3)
C-位域
摘要: struct { unsigned char x1 : 2; unsigned char x2 : 2; unsigned char x3 : 2; unsigned char x4 : 2; } Bunch; /* sizeof(Bunch) => 1 */ struct { unsigned c
阅读全文
posted @ 2020-09-05 00:42 朱小勇
阅读(143)
评论(0)
推荐(0)
Qt自带的死循环
摘要: Q_FOREVER { qDebug() << "..."; }
阅读全文
posted @ 2020-09-05 00:35 朱小勇
阅读(546)
评论(0)
推荐(0)
上一页
1
···
53
54
55
56
57
58
59
60
61
···
133
下一页
公告