0

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!

Kyle Gray
  • 115
  • 1
  • 7

2 Answers2

1

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
SourabhKus
  • 818
  • 8
  • 23
  • Where/how can I access the font.pixelSize of the keyboard buttons? Or the margins of the keyboard/InputPanel? I'm unable to find any mention of it in the documentation. I wonder if its possible, or if there is a Template for the keyboard/inputPanel like other QuQuick compnents such as Button, etc. – Kyle Gray Jan 17 '18 at 18:45
1

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

Kyle Gray
  • 115
  • 1
  • 7