• 6989阅读
  • 6回复

如何在StatusBar()右下角显示一个QLabel*? [复制链接]

上一主题 下一主题
离线280923299
 
只看楼主 倒序阅读 楼主  发表于: 2009-03-14
— 本帖被 XChinux 执行加亮操作(2009-03-16) —
问题是这样的:

我想要在一个StatusBar的右下角显示现在的玩家。但是我没有找到修改这个的属性。望谁能说一下。。
离线浪漫天使
只看该作者 1楼 发表于: 2009-03-15
addWidget
离线280923299
只看该作者 2楼 发表于: 2009-03-15
但是它会在左边显示。。
离线浪漫天使
只看该作者 3楼 发表于: 2009-03-15
第三个参数 是置成真的了么?
离线280923299
只看该作者 4楼 发表于: 2009-03-15
回楼上

void QStatusBar::addWidget ( QWidget * widget, int stretch = 0 )
Adds the given widget to this status bar, reparenting the widget if it isn't already a child of this QStatusBar object. The stretch parameter is used to compute a suitable size for the given widget as the status bar grows and shrinks. The default stretch factor is 0, i.e giving the widget a minimum of space.
The widget is located to the far left of the first permanent widget (see addPermanentWidget()) and may be obscured by temporary messages.
See also insertWidget(), removeWidget(), and addPermanentWidget().


没有第三个参数。。

是stretch么?应该设为什么?
只看该作者 5楼 发表于: 2009-03-15
layoutDirection : Qt::LayoutDirection
This property holds the layout direction for this widget.
By default, this property is set to Qt::LeftToRight.
Access functions:
Qt::LayoutDirection layoutDirection () const
void setLayoutDirection ( Qt::LayoutDirection direction )
void unsetLayoutDirection ()
离线280923299
只看该作者 6楼 发表于: 2009-03-16
谢谢。。终于找到了。。
快速回复
限100 字节
 
上一个 下一个