会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
朱小勇
博客园
园子
首页
新随笔
联系
管理
订阅
上一页
1
···
32
33
34
35
36
37
38
39
40
···
133
下一页
2022年1月14日
Signal QQmlEngine::quit() emitted, but no receivers connected to handle it quit
摘要: 1、问题描述 在QML中调用Qt.quit()但是程序没有退出 Keys.onPressed: { switch(event.key) { case Qt.Key_M: Qt.quit(); break; } } 2、解决 //main.cpp QApplication app(argc, argv
阅读全文
posted @ 2022-01-14 14:28 朱小勇
阅读(83)
评论(0)
推荐(0)
2022年1月13日
QVariant转指针或其他非内建数据
摘要: 1、QVariant转指针 QVariant a; //do something QObject* b = (QObject*)a.value<QObject*>(); 2、QVariant转其他非内建数据 QVariant a; //do something T b = (T)a.value<T>
阅读全文
posted @ 2022-01-13 17:18 朱小勇
阅读(700)
评论(0)
推荐(0)
std::vector学习
摘要: https://www.cnblogs.com/judes/p/10736275.html https://www.cnblogs.com/judes/p/10498959.html https://www.cnblogs.com/judes/p/13753516.html 1、删除指定序号的内容
阅读全文
posted @ 2022-01-13 09:54 朱小勇
阅读(636)
评论(0)
推荐(0)
2022年1月9日
Qt-blockSignals
摘要: 1、函数原型 当设置为true时,QObject对象[子类]不会发出信号 2、使用 在动态为QComboBox动态添加item的时候,它会发出xxxChanged信号,但是初始情况下我们不希望其发出,待初始化完成后再发出。 则可以: ①、先设置blockSignals(true); ②、动态添加it
阅读全文
posted @ 2022-01-09 22:24 朱小勇
阅读(423)
评论(0)
推荐(0)
2022年1月8日
C++-const修饰指针时类型识别方法
摘要: 多才多艺的const,修饰指针的的功能非常难辨认,总结出一个方法:用类似于函数的方式记忆。 1、const修饰函数【这种形式非常好识别】 const int* getData(); //返回值为常量[指向的对象] int getData() const; //函数本身为“常量”[函数不能修改类属性]
阅读全文
posted @ 2022-01-08 23:28 朱小勇
阅读(63)
评论(0)
推荐(0)
2022年1月6日
js打印异常日志
摘要: 1、代码 var x = 12; console.assert(x==12, "this will pass") console.assert(x>12, "this will fail") 第一个参数放我们希望成立的表达式,如果运行时不成立则打印这个异常,系统会将调用堆栈也打印出来。【QML中使用
阅读全文
posted @ 2022-01-06 18:34 朱小勇
阅读(577)
评论(0)
推荐(0)
QString转const char*
摘要: 1、代码 QString a = "123"; const char * a = a.toStdString().c_str();
阅读全文
posted @ 2022-01-06 11:15 朱小勇
阅读(231)
评论(0)
推荐(0)
C++将类名转字符串
摘要: 1、宏定义 #define STR_CLASS(var) #var 2、使用 class A; cout<<STR_CLASS(A);
阅读全文
posted @ 2022-01-06 11:10 朱小勇
阅读(450)
评论(0)
推荐(0)
2022年1月4日
Js-打印变量的类型
摘要: 1、typeof int a = 0; console.log(typeof a);//Number
阅读全文
posted @ 2022-01-04 15:57 朱小勇
阅读(1806)
评论(0)
推荐(0)
Js-枚举
摘要: 1、定义 var Status = Object.freeze({ "Connecting":0, "Ready":1, "Loading":2, "Processing": 3 }); 2、使用 console.log(Status.Ready) // 1 console.log(Object.k
阅读全文
posted @ 2022-01-04 15:25 朱小勇
阅读(125)
评论(0)
推荐(0)
上一页
1
···
32
33
34
35
36
37
38
39
40
···
133
下一页
公告