Android 设备上的QML元件';s状态栏
当显示设备的键盘时,我面临一个问题。这些元素在设备的状态栏上显示,如图所示 我已经尝试过使用Android 设备上的QML元件';s状态栏,android,ios,qml,statusbar,Android,Ios,Qml,Statusbar,当显示设备的键盘时,我面临一个问题。这些元素在设备的状态栏上显示,如图所示 我已经尝试过使用Flickable类型,但它不起作用。每次键盘出现时,它都会将应用程序元素推到状态栏上 PS:这个问题出现在Android和iOS上 代码如下: import QtQuick 2.4 import QtQuick.Window 2.2 import QtQuick.Controls 1.3 Window { visible: true property int larguraTela:
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
}
}
}
在Android上:您需要在
活动
标记的末尾添加Android:windowSoftInputMode=“adjustResize”
,因此它看起来像这样:
<activity ... android:windowSoftInputMode="adjustResize">
在Android上:您需要在
活动
标记的末尾添加Android:WindowsofInputMode=“adjustResize”
,因此它看起来像这样:
<activity ... android:windowSoftInputMode="adjustResize">
Qt将此行为视为错误。如果有人想跟上,这里是链接
Qt将此行为视为错误。如果有人想跟上,这里是链接