【发布时间】:2015-12-18 18:07:17
【问题描述】:
显示设备的键盘时遇到问题。元素在设备的状态栏上显示,如图所示。
我已经尝试使用Flickable 类型,但它不起作用。每次键盘出现时,它都会将应用元素推到状态栏上。
PS:Android 和 iOS 都会出现这个问题。
代码如下:
import QtQuick 2.4
import QtQuick.Window 2.2
import QtQuick.Controls 1.3
Window {
visible: true
property int larguraTela: 360
property int alturaTela: 640
width: larguraTela
height: alturaTela
maximumWidth: larguraTela
maximumHeight: alturaTela
minimumWidth: larguraTela
minimumHeight: alturaTela
title: "OverStatusBar"
Rectangle{
id: retangulo1
width: parent.width
height: parent.height * 0.5
anchors.top: parent.top
color: "grey"
}
Rectangle{
id: retangulo2
width: parent.width
height: parent.height * 0.5
anchors.top: retangulo1.bottom
color: "lightgrey"
TextField {
id: campoTexto
width: parent.width * 0.7
height: parent.height * 0.15
anchors.centerIn: parent
inputMethodHints: Qt.ImhDigitsOnly
}
}
}
【问题讨论】: