xlang v4.0 Release
程序设计语言基础库文档
载入中...
搜索中...
未找到
QComboBox.xcsm
浏览该文件的文档.
1
2package Qt{
3 @SuppressWarnings public class QComboBox : QWidget{
4 public QComboBox(){
5
6 }
7
8 public QComboBox(long handle){
9 super(handle);
10 }
11
12 public bool create()override {
13 nativehandle = QtXnl.createQObject(QType.qtComboBox, this, 0);
14 if (nativehandle == 0){
15 return false;
16 }
17 return true;
18 }
19
20 public bool create(@NotNilptr QWidget parent)override {
21 nativehandle = QtXnl.createQObject(QType.qtComboBox, this, parent.nativehandle);
22 if (nativehandle == 0){
23 return false;
24 }
25 return true;
26 }
27 public void setText(String text){
28 QtXnl.widget_slot_string(nativehandle, Constant.COMBOSETTEXT, text);
29 }
30
31 @NotNilptr
33 String __txt = (String)QtXnl.core_getString(nativehandle, Constant.COMBOGETTEXT);
34 __nilptr_safe(__txt);
35 return __txt;
36 }
37 public void addItems(String [] items){
38 QtXnl.widget_set_object_value(nativehandle, Constant.COMBOBOXADD, items);
39 }
40 public void clear(){
41 QtXnl.widget_get_bool_value(nativehandle, Constant.COMBOXCLR);
42 }
43 public void setCurrentIndex(int id){
44 QtXnl.widget_set_vint_value(nativehandle, Constant.COMBOBOXSETID, id);
45 }
46
47 public int getCurrentIndex(){
48 return QtXnl.widget_get_int_value(nativehandle, Constant.COMBOBOXGETID);
49 }
50
51 public void setView(QAbstractItemView v){
52 QtXnl.widget_set_native_value(nativehandle,Constant.QCOMBOBOX_SETVIEW,v.nativehandle);
53 }
54 };
55};
void setText(String text)
void setView(QAbstractItemView v)
int getCurrentIndex()
bool create() override
void addItems(String [] items)
bool create(@NotNilptr QWidget parent) override
String getCurrentText()
void setCurrentIndex(int id)
字符串类