- 博客(4)
- 资源 (4)
- 收藏
- 关注
原创 Qt防止重复调用
QT中要用到 类似按键防抖static void func_to_debounce(int a) { qDebug() << a + 1<<"debounce test"; }需要实现的函数 static void debounce_test() {}; function<void(int)> _function = func_to_d...
2019-09-24 13:47:18 801
原创 git rebase 回退
场景:远程代码有更新,自己也有更新,本地代码rebase后,push到了远程服务器,此时发现远程代码有错,想要重回之前commit版本,虽然现在看来commit已经续到了项目的尾部,但是不影响回退到你想要的版本。项目文件夹执行:git reflog00f12de HEAD@{0}: rebase finished: returning 00f12de HEAD@{1}: rebase: ...
2019-09-24 11:31:35 4588 15
原创 QLineEdit限制输入格式
使用正则表达式QRegExp,在Qt帮助文档中有详细使用说明。1.限制普通输入拿ip设置输入框为例:在输入框所在界面构造函数中写入: QRegExp regExp("[0-9.]{1,15}"); ui->lineEdit_ipv4_addr->setValidator(new QRegExpValidator(regExp,this)); ui...
2019-09-11 14:55:00 2421
原创 Qstring,string和char*转换
string转char * string temp ; char * tempc=temp.c_str(); string转QString string temp ; QString tempc = QString::fromStdString(temp); QString转String QString temp; String tempc = temp.toSt...
2019-09-02 22:43:46 325
jsonTool.zip
2021-07-21
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人