0
votes

I have created a custom keyboard layout for my QtQuick application using the VirtualKeyboard in 5.9.2. I am trying to fit this keyboard on a small screen to make it more readable and usable than the Virtual Keyboard was stock.

There are two things I need to do which I cannot seem to make work:

  1. Make the font larger on the keyboard buttons. After changing the layout, the buttons are larger, but the text on the buttons is still the same, tiny size. It looks strange.

  2. Reduce margins surrounding the keyboard to use up more of the available screen space. The keyboard is already set to the width of the screen. I could make it larger, but if I could simply reduce the margins that would be a much more simple solution.

Any help would be appreciated!

2

2 Answers

1
votes

you can use screen properties in qml and set font.pixelSize and margin according to screen height and width.

import QtQuick.Window 2.2

and use below properties

Screen.pixelDensity
Screen.height
Screen.width
1
votes

The best way to solve this is by using a style.qml sheet. This is answered in a different question of mine located here: Qt Virtual Keyboard Custom Style