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

QLineEdit如何设置靠右显示

2013-03-10 
QLineEdit怎么设置靠右显示在lineEdit框中怎么靠右显示啊?[解决办法]方法:setAlignment(Qt::AlignRight)

QLineEdit怎么设置靠右显示
在lineEdit框中怎么靠右显示啊?
[解决办法]
方法:
setAlignment(Qt::AlignRight);


其实文档上都有说的,这种问题差文档最好不过了:
voidsetAlignment ( Qt::Alignment flag )
The horizontal flags are:
ConstantValueDescription
Qt::AlignLeft0x0001Aligns with the left edge.
Qt::AlignRight0x0002Aligns with the right edge.
Qt::AlignHCenter0x0004Centers horizontally in the available space.
Qt::AlignJustify0x0008Justifies the text in the available space.
The vertical flags are:

ConstantValueDescription
Qt::AlignTop0x0020Aligns with the top.
Qt::AlignBottom0x0040Aligns with the bottom.
Qt::AlignVCenter0x0080Centers vertically in the available space.

热点排行