void createHandle_pp(int index) { if (variant == 0) { variant = ((getStyle() & SWT.SINGLE) != 0 ? TextUtils.LINE_EDIT : TextUtils.TEXT_EDIT); } int alignment = OS.QT_ALIGNLEFT; if ((style & SWT.CENTER) != 0) { alignment = OS.QT_ALIGNHCENTER; } else if ((style & SWT.RIGHT) != 0) { alignment = OS.QT_ALIGNRIGHT; } if (variant == TextUtils.LINE_EDIT) { scrollAreaHandle = 0; topHandle = handle = OS.QLineEdit_new(); OS.QLineEdit_setAlignment(handle, alignment | OS.QT_ALIGNVCENTER); OS.QLineEdit_setMaxLength(handle, LIMIT); if ((style & SWT.PASSWORD) != 0) { OS.QLineEdit_setEchoMode(handle, OS.QLINEEDIT_ECHOMODE_PASSWORD); } } else { frameHandle = topHandle = scrollAreaHandle = OS.QTextEdit_new(); handle = OS.QAbstractScrollArea_viewPort(scrollAreaHandle); OS.QTextEdit_setAlignment(scrollAreaHandle, alignment); forceTextLayout(); } OS.QWidget_setGeometry(topHandle, 0, 0, 0, 0); state |= WidgetState.HANDLE; if ((style & SWT.READ_ONLY) != 0) { setEditable(false); } }