QPushButton { background-image: url(:/Resources/green_click.png); image: url(:/Resources/toolsbutton_install.png); border:none; image-position:left; p Read More
posted @ 2016-06-10 22:09
findumars
Views(953)
Comments(0)
Diggs(0)
目前发现有两种方法,如下: 1、使用QPixmap的transformed函数旋转,这个函数默认是以图片中心为旋转点,不能随意设置旋转点,使用如下: QMatrix leftmatrix; leftmatrix.rotate(180); QLabel *pLabel= new QLabel();pL Read More
posted @ 2016-06-10 21:52
findumars
Views(7969)
Comments(0)
Diggs(0)
1、设置行间距 QLabel没有设置行间距的函数,所以这种办法是行不通的。只能采用其它类似的方法来实现,例如设置行高,使用样式代码如下: <p style='line-height:18px'>推荐</p> 2、链接文本 实现点击Label,即可打开网页,且文本没有下划线效果,如下: <a href Read More
posted @ 2016-06-10 21:50
findumars
Views(3364)
Comments(0)
Diggs(0)
在派生类中重载QDialog的void paintEvent(QPaintEvent *)事件,在这个函数中加入以下代码 QPainter painter(this); QLinearGradient grad(0, 0, width(), height()); QGradientStops gs; Read More
posted @ 2016-06-10 21:48
findumars
Views(2057)
Comments(0)
Diggs(0)
由于在windows下的QT编程中,如果涉及到使用微软的API,那么不可避免使用_TCHAR这些类型,因此在网上查了一下,其中一个老外的论坛有人给出了这个转换,因此在这里做一下笔记 : )#ifdef UNICODE #define QStringToTCHAR(x) (wchar_t*) x.ut Read More
posted @ 2016-06-10 21:47
findumars
Views(1569)
Comments(0)
Diggs(0)

浙公网安备 33010602011771号