1、去除对话框标题栏和边框 在构造函数里设置: this->setWindowFlags(Qt::FramelessWindowHint);Qt::Dialog (按照对话框的形式创建窗口--帮助/关闭)Qt::Window (按照正常窗口的形式创建窗口--最大化/最小化/关闭) 2、窗口可移动 去 Read More
posted @ 2016-06-10 23:21
findumars
Views(9703)
Comments(0)
Diggs(0)
方法: 使用 QComboxBox::addItem(QIcon, QString);示例: 点击(此处)折叠或打开 QComboBox *combo_status = new QComboBox(this); QIcon onlineIcon (":/icon/online.png"); QIco Read More
posted @ 2016-06-10 23:20
findumars
Views(1823)
Comments(0)
Diggs(0)
引言 用Qt程序在手机上显示一幅图片对编程人员来说是再基础不过的一件事情了。那么先让大家看两段代码: //dangerous should not be used, cannot display earth.png, //but if we change earth.png to a smaller Read More
posted @ 2016-06-10 23:18
findumars
Views(1588)
Comments(0)
Diggs(0)
Qt有两种定时器,一种是QObject类的定时器,另一种是QTimer类的定时器。 (1)QObject类的定时器 QObject类提供了一个基本的定时器,通过函数startTimer()来启动,通过killTimer()来结束,通过QTimerEvent来处理定时器事件。 (1)QObject类的 Read More
posted @ 2016-06-10 23:15
findumars
Views(5458)
Comments(0)
Diggs(0)
Qt的布局方式主要有四种: QGridLayout 栅格布局 QFormLayout 表格布局 QHBoxLayout 水平布局 QVBoxLayout 垂直布局 然而,只通过以上四种布局的组合似乎不太好用, 因此需要搭配分割器QSplitter, 在QSplitter中实现局部布局,最后再放进主布 Read More
posted @ 2016-06-10 23:14
findumars
Views(6340)
Comments(1)
Diggs(0)