会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
LCAC
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
8
9
10
11
12
13
下一页
2020年4月
Lua杂项
摘要: lua的全局变量全都保存在table里面,名字叫: _G 设置不能访问不存在的全局变量,不能赋值不存在的全局变量 setmetatable(_G, {__index = function(_, n) error("attempt to read undeclared variable" .. n,
阅读全文
posted @ 2020-04-15 00:21 LCAC
阅读(127)
评论(0)
推荐(0)
2020年3月
Qt Gui 第二十一章
摘要: 一、创建插件及添加插件 1、创建风格插件 #include <QStylePlugin> class BronzeStylePlugin : public QStylePlugin { public: QStringList keys() const; QStyle *create(const QS
阅读全文
posted @ 2020-03-08 15:32 LCAC
阅读(204)
评论(0)
推荐(0)
Qt Gui 第十九章
摘要: 1、Qt样式表 .qss文件;跟html的css文件格式差不多。 例如:selector1, selector2。。。 {property1: value1; property2: value2; 。。。。} 表示多个选择器,对应多个属性值; 也可以在代码中直接编写;例如: // 指向全局的设置QL
阅读全文
posted @ 2020-03-06 22:57 LCAC
阅读(403)
评论(0)
推荐(0)
Qt Gui 第十六章
摘要: 一、QXmlStreamReader 用于读取格式良好的xml文档的快速解析器;解析步骤 QXmlStreamReader reader; QFile file(fileName); reader.setDevice(&file); 如上将xml文件加载到reader中;也可以直接 QXmlStre
阅读全文
posted @ 2020-03-03 21:43 LCAC
阅读(228)
评论(0)
推荐(0)
Qt Gui 第十五章
摘要: 当使用网络的时候,不管是ftp、http、tcpsocket或者udpsocket都需要在配置文件中添加:QT += network 一、ftp 说明:qt5没有ftp,qt5只支持QNetworkAccessManager;具体如何让qt5支持ftp,另外说明。 1、ftp简易读取文件 QUrl
阅读全文
posted @ 2020-03-03 00:27 LCAC
阅读(361)
评论(0)
推荐(0)
Qt Gui 第十四章
摘要: 一、QThread 当要运行多线程,则需要继承该类,并重写对应的run()函数;当启动线程执行run函数的时候,则需要调用start函数;等待run函数执行完毕则是wait函数; 当在run函数中,用一个变量来标记是否一直循环执行的时候;最好该标记使用volatile 该关键字,例如:volatil
阅读全文
posted @ 2020-03-01 19:21 LCAC
阅读(140)
评论(0)
推荐(0)
2020年2月
leetcode 47. Permutations II
摘要: 全排列数组 为了得到最快的速度和最小的空间;先计算结果需要容纳多大的数组; int GetCMN(int m, int n) { if (n == m || n == 0) return 1; int mm = 1; n = m -n > n?n:m-n; for (int i = 1; i <=
阅读全文
posted @ 2020-02-27 16:51 LCAC
阅读(153)
评论(0)
推荐(0)
leetcode 44. Wildcard Matching
摘要: 这道题跟leetcode的第10道题差不多;都是用差不多相同的思想解题。 当为?或者p1 == s1 的时候,则dp[p1][s1] = dp[p0][s0] 当为*的时候,则dp[p1][s1] = dp[p1][s0] | dp[p0][s0] | dp[p0][s1]; 因为,此时p1可以等于
阅读全文
posted @ 2020-02-25 22:35 LCAC
阅读(107)
评论(0)
推荐(0)
Qt Gui 第十章
摘要: 一、QListWidget、QTableWidget和QTreeWidget QTableWidget的item默认是可以编辑,其他两个的item默认是不可编辑。如果要将QTableWidget设置成不可编辑,可以使用 tableWidget->setEditTriggers(QAbstractIt
阅读全文
posted @ 2020-02-24 16:11 LCAC
阅读(449)
评论(0)
推荐(0)
leetcode 30. Substring with Concatenation of All Words
摘要: Input: s = "barfoothefoobarman", words = ["foo","bar"] Output: [0,9] 这道题给定的words中的单词长度都是一样的,从连续的s子字符串中找出words中的所有单词,并且words中对应的连续的s是不能重叠的,words的顺序可以打乱
阅读全文
posted @ 2020-02-21 20:56 LCAC
阅读(129)
评论(0)
推荐(0)
上一页
1
···
8
9
10
11
12
13
下一页
公告