• 3912阅读
  • 2回复

请问,如何制作移动的Label [复制链接]

上一主题 下一主题
离线smallwanxx
 
只看楼主 倒序阅读 楼主  发表于: 2010-03-01
怎么让在QLabel已经显示的时候改变它的位置?
比如做个按键,按一次就向右移动10。
离线xtfllbl

只看该作者 1楼 发表于: 2010-03-01
pos : QPoint

This property holds the position of the widget within its parent widget.

If the widget is a window, the position is that of the widget on the desktop, including its frame.

When changing the position, the widget, if visible, receives a move event (moveEvent()) immediately. If the widget is not currently visible, it is guaranteed to receive an event before it is shown.

By default, this property contains a position that refers to the origin.

Warning: Calling move() or setGeometry() inside moveEvent() can lead to infinite recursion.

See the Window Geometry documentation for an overview of window geometry.

Access functions:

QPoint pos () const
void move ( int x, int y )
void move ( const QPoint & )
上海欢迎您
离线xtfllbl

只看该作者 2楼 发表于: 2010-03-01
使用move
上海欢迎您
快速回复
限100 字节
 
上一个 下一个