QT修改应用程序图标
摘要:1. 要准备一个ico的图标,必须是ico格式,切记!! 可以用png或者其他的在线转换:http://www.easyicon.net/covert/ 2. 用记事本 新建文件icon.rc,内容为: 3. 把icon.rc和title.ico文件都放在pro文件所在目录 4. 在pro文件里面添
阅读全文
posted @
2016-07-24 20:29
神秘藏宝室
阅读(383)
推荐(0)
纪念下自学QT 第十天 终于写成了串口调试助手
摘要: 
阅读全文
posted @
2016-07-23 21:48
神秘藏宝室
阅读(1066)
推荐(0)
QT设置textEdit光标到末尾
摘要:```c
//移动光标到末尾 QTextCursor cursor = ui->receiveTextEdit->textCursor(); cursor.movePosition(QTextCursor::End); ui->receiveTextEdit->setTextCursor(cursor);
```
阅读全文
posted @
2016-07-22 22:47
神秘藏宝室
阅读(7397)
推荐(1)
QT设置TextEdit颜色
摘要:```c
//设置textEdit颜色 QPalette palette= ui->receiveTextEdit->palette(); palette.setColor(QPalette::Base, Qt::black); palette.setColor(QPalette::Text, Qt::green); ui->receiveTextEdit->set...
阅读全文
posted @
2016-07-22 22:46
神秘藏宝室
阅读(1794)
推荐(0)
QT设置QToolBar带有图标和文字
摘要:```c ui->mainToolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
```
阅读全文
posted @
2016-07-22 22:45
神秘藏宝室
阅读(4198)
推荐(0)
QT5使用Webkti
摘要:Qt 5.3 使用原来的QT4.8.4项目时QWebView 、QWebFrame等类无法编译通过。 出现原因:QWebView 、QWebFrame、QWebPage、QWebInspector等这些类被单独移到了QtWebKitWidgets模块,不再在QtWebKit模块当中;而QWebHis
阅读全文
posted @
2016-07-20 20:15
神秘藏宝室
阅读(446)
推荐(0)
QT发布的EXE打包压缩成单文件
摘要:Enigma virtual box 是免费的软件虚拟化工具,它可以将多个文件封装到您的应用程序主文件,这样您的软件就可以制作成为单文件的绿色软件。 enigma virtual box 支持所有类型的文件格式,包括动态链接库 (.dll), activex/com (.dll, .ocx), 视频
阅读全文
posted @
2016-07-19 22:49
神秘藏宝室
阅读(1352)
推荐(0)
QT5的QDesktopSerivices不同
摘要:QT4使用QDesktopServices::storageLocation(QDesktopServices::xxxx)来获取一些系统目录, 现在则要改成QStandardPaths::writableLocation(QStandardPaths::xxxx)来获取。
阅读全文
posted @
2016-07-19 21:46
神秘藏宝室
阅读(547)
推荐(0)
QT里面的delay使用
摘要:```c void delay() { QTime dieTime= QTime::currentTime().addSecs(1); while( QTime::currentTime()
阅读全文
posted @
2016-07-16 22:24
神秘藏宝室
阅读(2255)
推荐(0)
QT5的exe的发布
摘要:直接release的exe文件需要很多dll关联,一个一个找又太麻烦。 其实QT5带有一个 windeployqt 工具 Qt Widgets Application可执行程序发布方式 1. 首先用 QtCreator 新建一个 Qt Widgets Application 项目,直接用默认的 QM
阅读全文
posted @
2016-07-15 23:07
神秘藏宝室
阅读(4332)
推荐(0)
MainWindows
摘要:开发带有菜单栏状态栏等常用windows应用时候使用
阅读全文
posted @
2016-07-14 22:10
神秘藏宝室
阅读(349)
推荐(0)
QMessageBox简单使用
摘要:首先要调用 然后 或者简单点 常用的弹出框类型 1. Question For asking a question during normal operations. 2. Information For reporting information about normal operations.
阅读全文
posted @
2016-07-13 21:52
神秘藏宝室
阅读(5288)
推荐(0)
获取comboBox里面的item使用的方法
摘要:使用currentIndex()或者currentText()
阅读全文
posted @
2016-07-13 21:37
神秘藏宝室
阅读(1542)
推荐(0)
按键槽的写法
摘要:默认的槽 自己写的槽 关键看connect的写法
阅读全文
posted @
2016-07-13 21:14
神秘藏宝室
阅读(301)
推荐(0)
int to String
摘要:number()可以转换int to QString
阅读全文
posted @
2016-07-13 21:10
神秘藏宝室
阅读(385)
推荐(0)