Qt5 Virtual Slot

Provides a styling interface for the Virtual Keyboard. More...

Import Statement: import QtQuick.VirtualKeyboard.Styles 2.2
Inherits:
  1. Can someone explain to me why is the overridden method is not being called in base class slot, instead I have a base version of method: class ThreadsDispatcher: public QObject QOBJECT public: explicit ThreadsDispatcher(QObject.parent = 0); virtual ThreadsDispatcher; virtual void OnThreadFinished(IThreadable.pWorker); public slots: void slotThreadFinished(IThreadable.
  2. This is the sequel of my previous article explaining the implementation details of the signals and slots. In the Part 1, we have seen the general principle and how it works with the old syntax.In this blog post, we will see the implementation details behind the new function pointer based syntax in Qt5.

Installing Qt 5.0.2 on Ubuntu. Note: For the latest GNU compiler its probably worth getting the latest Ubuntu release (i.e. = 12.10 for gcc/g 4.7 or higher for the c11 features) rather then trying to upgrade the compiler and all the links/libraries yourself! I recommend Ubuntu 12.10 for the moment which give gnu 4.7.2, but this is all. While Qt 5.0 introduced a lot of new features, it was mostly compatible with Qt 4 and allowed developers to seamlessly migrate to the new major version. In 2014, Digia formed the Qt Company that is now responsible for Qt development, commercialization, and licensing.

Properties

  • alternateKeysListBackground : Component
  • alternateKeysListBottomMargin : real
  • alternateKeysListDelegate : Component
  • alternateKeysListHighlight : Component
  • alternateKeysListItemHeight : real
  • alternateKeysListItemWidth : real
  • alternateKeysListLeftMargin : real
  • alternateKeysListRightMargin : real
  • alternateKeysListTopMargin : real
  • backspaceKeyPanel : Component
  • characterPreviewDelegate : Component
  • characterPreviewMargin : real
  • enterKeyPanel : Component
  • fullScreenInputBackground : Component
  • fullScreenInputColor : color
  • fullScreenInputContainerBackground : Component
  • fullScreenInputCursor : Component
  • fullScreenInputFont : font
  • fullScreenInputMargins : real
  • fullScreenInputPadding : real
  • fullScreenInputPasswordCharacter : string
  • fullScreenInputSelectedTextColor : color
  • fullScreenInputSelectionColor : color
  • handwritingKeyPanel : Component
  • hideKeyPanel : Component
  • keyPanel : Component
  • keyboardBackground : Component
  • keyboardDesignHeight : real
  • keyboardDesignWidth : real
  • keyboardHeight : real
  • keyboardRelativeBottomMargin : real
  • keyboardRelativeLeftMargin : real
  • keyboardRelativeRightMargin : real
  • keyboardRelativeTopMargin : real
  • languageKeyPanel : Component
  • languageListAdd : Transition
  • languageListBackground : Component
  • languageListDelegate : Component
  • languageListHighlight : Component
  • languageListRemove : Transition
  • languagePopupListEnabled : bool
  • modeKeyPanel : Component
  • navigationHighlight : Component
  • popupListAdd : Transition
  • popupListBackground : Component
  • popupListDelegate : Component
  • popupListHighlight : Component
  • popupListRemove : Transition
  • scaleHint : real
  • selectionHandle : Component
  • selectionListAdd : Transition
  • selectionListBackground : Component
  • selectionListDelegate : Component
  • selectionListHeight : real
  • selectionListHighlight : Component
  • selectionListRemove : Transition
  • shiftKeyPanel : Component
  • spaceKeyPanel : Component
  • symbolKeyPanel : Component
  • traceCanvasDelegate : Component
  • traceInputKeyPanelDelegate : Component

Detailed Description

The style type provides the style definitions that are used by the InputPanel to decorate the virtual keyboard.

The design size specifies the aspect ratio of the virtual keyboard. Styles are scalable according to scaleHint, which is calculated from the keyboard's actual height and design height.

Property Documentation

Template for the alternative keys list background.


Bottom margin for the alternate keys list panel.


Template for the alternative keys list item.

Note: The delegate is used in a ListView.


Template for the alternative keys list highlight.

Note: The delegate is used as ListView.highlight.


Height of the alternate keys list item.


Width of the alternate keys list item.


Left margin for the alternate keys list panel.


Right margin for the alternate keys list panel.


Top margin for the alternate keys list panel.


Template for the backspace key.

Note: The delegate must be based on the KeyPanel type.


Template for the character preview popup.

If the delegate contains the text property, the property is updated with the display text when the component becomes active.

Example:


Number of pixels between the top of each key and the bottom of the characterPreviewDelegate.


Template for the enter key.

Note: The delegate must be based on the KeyPanel type.


This property holds the delegate for the background of the full screen input.

This QML property was introduced in QtQuick.VirtualKeyboard.Styles 2.2.


This property holds the text color for the full screen input field.

The default color is black.

This QML property was introduced in QtQuick.VirtualKeyboard.Styles 2.2.


This property holds the delegate for the background of the full screen input container.

This QML property was introduced in QtQuick.VirtualKeyboard.Styles 2.2.


This property holds the delegate for the cursor in the full screen input field.

The delegate should toggle the visibility of the cursor according to the parent.blinkStatus property defined for the full screen input field. For example:

This QML property was introduced in QtQuick.VirtualKeyboard.Styles 2.2.


This property holds the font for the full screen input field.

This QML property was introduced in QtQuick.VirtualKeyboard.Styles 2.2.


This property holds the margins around the full screen input field.

The default value is 0.

This QML property was introduced in QtQuick.VirtualKeyboard.Styles 2.2.


This property holds the padding around the full screen input content.

The default value is 0.

This QML property was introduced in QtQuick.VirtualKeyboard.Styles 2.2.


This property holds the password mask character for the full screen input field.

This QML property was introduced in QtQuick.VirtualKeyboard.Styles 2.2.


This property holds the selected text color for the full screen input field.

The default color is set to fullScreenInputColor.

This QML property was introduced in QtQuick.VirtualKeyboard.Styles 2.2.


This property holds the selection color for the full screen input field.

The default color is semi-transparent black.

This QML property was introduced in QtQuick.VirtualKeyboard.Styles 2.2.


Template for the handwriting mode key.

Note: The delegate must be based on the KeyPanel type.


Template for the hide key.

Note: The delegate must be based on the KeyPanel type.


Template for the regular keys.

Note: The delegate must be based on the KeyPanel type.

Example:


Template for the keyboard background.

Example:


The design height of the keyboard.


The design width of the keyboard.


The current height of the keyboard.


The distance between the bottom-most keys and the bottom edge of the keyboard container, expressed as a percentage (0.0 - 1.0) of the keyboard's height.


The distance between the left-most keys and the left edge of the keyboard, expressed as a percentage (0.0 - 1.0) of the keyboard's width.


The distance between the right-most keys and the right edge of the keyboard, expressed as a percentage (0.0 - 1.0) of the keyboard's width.

This value is proportional to the keyboard's width.


The distance between the top-most keys and the top edge of the keyboard, expressed as a percentage (0.0 - 1.0) of the keyboard's height.


Template for the language key.

Note: The delegate must be based on the KeyPanel type.


This property holds the transition to apply to items that are added to the language list view.

This QML property was introduced in QtQuick.VirtualKeyboard.Styles 2.1.


Template for the language list background.

This QML property was introduced in QtQuick.VirtualKeyboard.Styles 2.1.


Template for the language list item.

Note: The delegate is used in a ListView.

Note: The delegate must be based on the SelectionListItem type.

The following properties are available to the item:

  • display Display text for the current item.
  • wordCompletionLength Word completion length measured from the end of the display text.

This QML property was introduced in QtQuick.VirtualKeyboard.Styles 2.1.


Template for the language list highlight.

Note: The delegate is used as ListView.highlight.

This QML property was introduced in QtQuick.VirtualKeyboard.Styles 2.1.


This property holds the transition to apply to items that are removed from the language list view.

This QML property was introduced in QtQuick.VirtualKeyboard.Styles 2.1.


This property determines whether a popup list will be shown when the language key is clicked. If this property is false, clicking the language key cycles through the available languages one at a time.

The default value is false.

This QML property was introduced in QtQuick.VirtualKeyboard.Styles 2.1.


Template for the generic mode key.

This template provides a visualization of the key in which the state can be on or off. This template is used in situations where the key label will remain the same regardless of status.

The current state is available in the control.mode property.

Note: The delegate must be based on the KeyPanel type.


Template for the navigation highlight item.

This item is used in arrow-key-navigation mode to highlight the navigation focus on the keyboard.

The item is typically a transparent rectangle with a high contrast border.

This QML property was introduced in QtQuick.VirtualKeyboard.Styles 1.1.


This property holds the transition to apply to items that are added to the popup list view.

This QML property was introduced in QtQuick.VirtualKeyboard.Styles 2.1.


Template for the popup list background.

This QML property was introduced in QtQuick.VirtualKeyboard.Styles 2.1.


Template for the popup list item.

Note: The delegate is used in a ListView.

Note: The delegate must be based on the SelectionListItem type.

The following properties are available to the item:

  • display Display text for the current item.
  • wordCompletionLength Word completion length measured from the end of the display text.

This QML property was introduced in QtQuick.VirtualKeyboard.Styles 2.1.


Template for the popup list highlight.

Note: The delegate is used as ListView.highlight.

This QML property was introduced in QtQuick.VirtualKeyboard.Styles 2.1.


This property holds the transition to apply to items that are removed from the popup list view.

This QML property was introduced in QtQuick.VirtualKeyboard.Styles 2.1.


The keyboard style scale hint. This value is determined by dividing keyboardHeight by keyboardDesignHeight. All pixel dimensions must be proportional to this value.


This item is used to indicate where the bounds of the text selection is and to be able to interactively move the start or end of the selection. The same item is used for both start and end selection.

Selection handles are currently only supported for the application-based integration method.

This QML property was introduced in QtQuick.VirtualKeyboard.Styles 2.1.

Slots

This property holds the transition to apply to items that are added to the selection list view.

This QML property was introduced in QtQuick.VirtualKeyboard.Styles 1.3.


Template for the selection list background.


Template for the selection list item.

Note: The delegate is used in a ListView.

Note: The delegate must be based on the SelectionListItem type.

The following properties are available to the item:

  • display Display text for the current item.
  • wordCompletionLength Word completion length measured from the end of the display text.

Qt Virtual Slot

Selection list height.


Template for the selection list highlight.

Note: The delegate is used as ListView.highlight.


This property holds the transition to apply to items that are removed from the selection list view.

This QML property was introduced in QtQuick.VirtualKeyboard.Styles 1.3.


Template for the shift key.

Note: The delegate must be based on the KeyPanel type.


Template for the space key.

Note: The delegate must be based on the KeyPanel type.


Template for the symbol mode key.

Note: The delegate must be based on the KeyPanel type.


Template for rendering a Trace object.

Note: The delegate must be based on the TraceCanvas type.

This QML property was introduced in QtQuick.VirtualKeyboard.Styles 2.1.


Template for the trace input key.

Note: The delegate must be based on the TraceInputKeyPanel type.

This QML property was introduced in QtQuick.VirtualKeyboard.Styles 2.1.

Qt5 Virtual Slots


© 2020 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.

IMPORTANT: The content of this page is outdated. Reason: Old versions of Qt, Ubuntu and Virtual Box
If you have checked or updated this page and found the content to be suitable, please remove this notice.
  • 64. Trouble Shooting

Introduction

Having struggled for a few days getting the correct sequence of events to occur to allow me to run Qt on a Ubuntu virtual machine on my window PC I feel I should share what I have found incase others want to do the same.

Why would you want to even do that? - well, in my case, I can now run my Qt project on Windows and Linux very easily and very quickly test it works for both. This provides quicker multi-platform testing. You can also test multiple versions of Ubuntu (or windows) and with different compiler versions as well, you just add more virtual machines.

Finally to be able to work / sync to the same code-base you can install/use rabbitVCS on Ubuntu so that it works in the same way as tortoise SVN in windows, and then all of your virtual machines are 'talking' to the same SVN repo… nice :)

Versions

These are the versions that I have used / tested this all withWindows: XP SP3 (as my host operating system)Ubuntu: 10.04, 12.04 and 12.10VirtualBox: v4.2.12

1. Setting Up VirtualBox with Ubuntu

In the purpose of this wiki I will use the example of Ubuntu 12.04 and make notes where other versions may differ.

Install and setup a virtual machine for Ubuntu:

  • Download and install VirtualBox latest version
  • Run virtual box and cklick 'new'
  • Enter name and ensure 'version' is Ubuntu. Go through the screens and select the following options:
  • at least 512MB (more if you can, allow about 1/4 of your memory).
  • Create virtual HDD
  • VDI
  • Dynamic or Fixed (I chose fixed because I heard there can be issues with running out of disk space with dynamic, but I am sure dynamic is probably ok!)
  • Allow at Enough space, the default is ok (8GB)…

Now your Virtual Machine is created. Do the following to install Ubuntu:

  • Download Linux .iso image from http://releases.ubuntu.com/precise/ (I put it on a USB stick)
  • Double click your fresh virtual machine called <name> (whatever you called it)
  • It will ask you to select a Startup disk. Click the browse button and select your .iso image. Now your ubuntu will boot from this image
  • Ubuntu will run, you will have two options: 'Use Ubuntu' or 'Install', click install and follow the installation process, I just used all the defaults (except for username, passwords, etc…).
  • Once this is completed you will reboot Ubuntu. If your virtual machine does not automatically restart, close it (shutdown) and re-start it in VirtualBox.
  • At this point your Ubuntu may boot and tell you that you are in 'low graphics mode'. Don't panic, just press ctrl+alt+f1 (left ctrl button) to go to the command line and continue with the following steps, otherwise you are done for this part :)
  • Login by entering your user name followed by your password.
  • Once you are logged in enter: 'sudo apt-get update'
  • For 'sudo' it will ask you for your password again, enter it.
  • Enter 'sudo apt-get upgrade' to perform the upgrades.
  • Now enter 'sudo reboot' to reboot, this should sort it.

Once you are in to ubuntu, you may want to install further updates from the update manager… or go into a terminal and run the previous 4 steps (except for the reboot part :o )

Now to make your Virtual Ubuntu experience even better (otherwise you are limited to a tiny window and have no copy/paste buffer or other shared resources, etc…

  • You need to install Guest Additions in your Virtual Machine. For Ubuntu there is a handy 'install guest addtions' under the devices menu when you are running Ubuntu. Click this.
  • This copies some files to: /media/VBOXADDITIONS….
  • cd to this location
  • now run the linux additions: './VBoxLinuxAdditions.run'
  • Once this is finished, restart your VMachine.

2. Installing Qt 5.0.2 on Ubuntu

Note: For the latest GNU compiler its probably worth getting the latest Ubuntu release (i.e. >= 12.10 for gcc/g++ 4.7 or higher for the c++11 features) rather then trying to upgrade the compiler and all the links/libraries yourself! I recommend Ubuntu 12.10 for the moment which give gnu 4.7.2, but this is all your choice…

  • download the latest (or whichever version you want) Qt sdk from qt.io/download (5.0.2 was used at the time of writing)
  • cd to the download directory and enter the following commands:
  • sudo chmod +x qt-linux-opensource-5.0.2-x86-offline.run (where this is the file you downloaded, this makes it eXecutable)
  • sudo ./qt-linux-opensource-5.0.2-x86-offline.run (to run it)
  • Follow the install instructions.

Now you have Qt 5.0.2, with Qt creator and all the tools to run and build your project. But since I documented RabbitVCS I may as well add that next…

3. RabbitVCS (a TortoiseSVN substitute for Ubuntu)

  • Enter the following in a terminal (enter password for first 'sudo' command
  • sudo add-apt-repository ppa:rabbitvcs/ppa
  • sudo apt-get update
  • For Ubuntu >= 11.10: 'sudo apt-get install rabbitvcs-thunar rabbitvcs-gedit rabbitvcs-cli rabbitvcs-nautilus3'
  • For Ubuntu < 11.10: 'sudo apt-get install rabbitvcs-thunar rabbitvcs-gedit rabbitvcs-cli rabbitvcs-nautilus'
  • Now log out of Ubuntu and log back in for changes to take effect.

Note: To use, right click in any folder and do SVN —> Checkout…. the rest is pretty much the same as tortoiseSVN :)Or, you can use the command line :(

4. Trouble Shooting

This is a list of issues that I faced and how they where resolved, I will add to this list if I find more…

Ubuntu 12.04 has experienced an internal error with /usr/bin/Xorg

Re-start lightdm to clear the problem:

  • sudo service lightdm stop
  • sudo dpkg-reconfigure xorg xserver-xorg xserver-xorg-core
  • sudo service lightdm start

'/usr/bin/ld: cannot find -lgcc_s' when building your Qt project

In some later versions of Ubuntu some files seem to have moved or been renamed and we need to make a sym link to fix this (well, this is the easiest way to do it). Do this with the following line in a terminal:

  • sudo ln -s /lib/libgcc_s.so.1 /lib/libgcc_s.so

5. Final Note

Feel free to comment, add-to or correct this page :) … or even just laugh and say 'look at this idiot there' :o

6. Related Articles

Retrieved from 'https://wiki.qt.io/index.php?title=How_to_setup_Qt5_for_Ubuntu_using_Virtual_Box&oldid=23149'