xlang v4.0 Release
程序设计语言基础库文档
载入中...
搜索中...
未找到
Public 成员函数
QLabel类 参考
类 QLabel 继承关系图:
QFrame

Public 成员函数

额外继承的成员函数

详细描述

在文件 QLabel.xcsm2 行定义.

构造及析构函数说明

◆ QLabel() [1/2]

QLabel ( )

在文件 QLabel.xcsm3 行定义.

3 {
4
5 }

◆ QLabel() [2/2]

QLabel ( long  handle)

在文件 QLabel.xcsm7 行定义.

7 {
8 super(handle);
9 }

成员函数说明

◆ alignment()

int alignment ( )

在文件 QLabel.xcsm29 行定义.

29 {
30 return QtXnl.widget_get_int_value(nativehandle, Constant.QLABEL_GETALIGNMENT);
31 }

◆ create() [1/2]

bool create ( )
override

重载 QWidget .

在文件 QLabel.xcsm11 行定义.

11 {
12 nativehandle = QtXnl.createQObject(QType.qtLabel, this, 0);
13 if (nativehandle == 0){
14 return false;
15 }
16 return true;
17 }
long nativehandle
Definition QNative.xcsm:91

◆ create() [2/2]

bool create ( @NotNilptr QWidget  parent)
override

重载 QWidget .

在文件 QLabel.xcsm19 行定义.

19 {
20 nativehandle = QtXnl.createQObject(QType.qtLabel, this, parent.nativehandle);
21 if (nativehandle == 0){
22 return false;
23 }
24 return true;
25 }

◆ getText()

String getText ( )

在文件 QLabel.xcsm36 行定义.

36 {
37 String __txt = (String)QtXnl.core_getString(nativehandle, Constant.LBLGETTEXT);
38 __nilptr_safe(__txt);
39 return __txt;
40 }
字符串类

◆ setAlignment()

void setAlignment ( int  a)

在文件 QLabel.xcsm32 行定义.

32 {
33 QtXnl.widget_set_vint_value(nativehandle, Constant.QLABEL_SETALIGNMENT, a);
34 }

◆ setPixmap()

void setPixmap ( QImage  img)

在文件 QLabel.xcsm44 行定义.

44 {
45 QtXnl.widget_set_native_value(nativehandle, Constant.LBLSETSETPIXMAP, img.himage);
46 }

◆ setScaledContents()

void setScaledContents ( bool  b)

在文件 QLabel.xcsm41 行定义.

41 {
42 QtXnl.widget_set_bool_value(nativehandle, Constant.LBLSETSCALEDCONTENTS, b);
43 }

◆ setText()

void setText ( String  text)

在文件 QLabel.xcsm26 行定义.

26 {
27 QtXnl.widget_slot_string(nativehandle, Constant.LBLSETTEXT, text);
28 }