xlang v4.0 Release
程序设计语言基础库文档
载入中...
搜索中...
未找到
QLineEdit.xcsm
浏览该文件的文档.
1
2package Qt{
3 @SuppressWarnings public class QLineEdit : QWidget{
4 static const int Normal = 0, NoEcho = 1, Password = 2, PasswordEchoOnEdit = 3;
5 public enum EchoMode { Normal, NoEcho, Password, PasswordEchoOnEdit };
6 public QLineEdit(){
7
8 }
9
10 public QLineEdit(long handle){
11 super(handle);
12 }
13
14 public bool create()override {
15 nativehandle = QtXnl.createQObject(QType.qtLineEdit, this, 0);
16 if (nativehandle == 0){
17 return false;
18 }
19 return true;
20 }
21
22 public bool create(@NotNilptr QWidget parent)override {
23 nativehandle = QtXnl.createQObject(QType.qtLineEdit, this, parent.nativehandle);
24 if (nativehandle == 0){
25 return false;
26 }
27 return true;
28 }
29 public void setText(String text){
30 QtXnl.widget_slot_string(nativehandle, Constant.LINEEDITSETTEXT, text);
31 }
32 public void setMaxLength(int maxlen){
33 QtXnl.widget_set_vint_value(nativehandle, Constant.QLINESETMAXLEN, maxlen);
34 }
35 public void setEchoMode(EchoMode em){
36 QtXnl.widget_set_vint_value(nativehandle, Constant.QLINESETECHOMODE, em.value());
37 }
38 public void setPlaceholderText(String placeholderText){
39 QtXnl.widget_slot_string(nativehandle, Constant.LESETPLACEHOLDERTEXT, placeholderText);
40 }
42 return (String)QtXnl.core_getString(nativehandle, Constant.LEGETPLACEHOLDERTEXT);
43 }
44 public void setValidator(String regex){
45 QtXnl.widget_slot_string(nativehandle, Constant.QLEDITSETVALIDATOR, regex);
46 }
47 @NotNilptr public String getText(){
48 String __txt = (String)QtXnl.core_getString(nativehandle, Constant.LINEEDITGETTEXT);
49 __nilptr_safe(__txt);
50 return __txt;
51 }
52 };
53};
void setText(String text)
void setMaxLength(int maxlen)
QLineEdit(long handle)
bool create() override
void setPlaceholderText(String placeholderText)
String placeholderText()
bool create(@NotNilptr QWidget parent) override
void setEchoMode(EchoMode em)
void setValidator(String regex)
String getText()
字符串类