首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

Qt 小技术小结-持续更新

2012-09-09 
Qt 小技术总结-持续更新//设置应用程序的光标为标准的等待光标(通常是一个沙漏)QApplication::setOverride

Qt 小技术总结-持续更新

//设置应用程序的光标为标准的等待光标(通常是一个沙漏)

QApplication::setOverrideCursor(Qt::WaitCursor);

?

?

\r回车(CR)013

\t水平制表(HT)009

?

//QMainWindow中设定中央窗口部件的方法

setCentralWidget(widget);

?

-----以下方法在窗口不可见的时候,没有任何操作-----

//repaint()函数会强制产生一个即时的重绘事件

void QWidget::repaint();

//在Qt下一次处理事件时才简单地调用一个绘制事件。如果多次调用update();Qt就会把连续多次的绘制事件压缩成一个单一的绘制事件,这样就可以避免闪烁现象。

void QWidget::update();

//Notifies the layout system that this widget has changed and may need to change geometry.

void QWidget::updateGeometry ()

?

//Scrolls the widget including its children dx pixels to the right and dy downward. Both dx and dy may be negative.

//移动窗口部件内容

void QWidget::scroll(int x,int y);

?

//事件转换

if(event->type() == QEvent::KeyPress)

? ? ?QKeyEvent ?*keyEvent= static_cast<QKeyEvent *>(event);

热点排行