O'Reilly logo

Game Programming using Qt 5 Beginner's Guide - Second Edition by Lorenz Haas, Witold Wysota, Pavel Strakhov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – Adding an import

The default object palette contains a very minimal set of types provided by the QtQuick module. To access a richer set of controls, we need to add an import directive to our document. To do this, locate the Library pane in the top-left corner of the window and go to its Imports tab. Next, click on Add Import and select QtQuick.Controls 2.2 in the drop-down list. The selected import will appear in the tab. You can click on the × button to the left of the import to remove it. Note that you cannot remove the default import.

Adding the import using the form editor will result in adding the import QtQuick.Controls 2.2 directive to the .ui.qml file. You can switch the main area to the Text Editor mode to see this ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required