Jump to content

QtDesignStudio/UsingRealQt: Difference between revisions

From Qt Wiki
Guide: How to use Qt Design Studio with real Qt environment
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
=== Using Qt Design Studio with real Qt environment ===
== Using Qt Design Studio with real Qt environment ==
 
Typically Qt Design Studio does not directly integrate with a real Qt environment, as tooling cannot cope with vast changes that might be there in the real Qt. This is why Qt Design Studio is delivered with a purpose-built minified Qt environment.  
Typically Qt Design Studio does not directly integrate with a real Qt environment, as tooling cannot cope with vast changes that might be there in the real Qt. This is why Qt Design Studio is delivered with a purpose-built minified Qt environment.  


<big>Disclaimer:</big> Using a full Qt exposes all QML types to Qt Design Studio and some might not work right.
<big>Disclaimer:</big> Using a full Qt exposes all QML types to Qt Design Studio and some might not work right. Qt DS RnD is not responsible for such issues.


This guide will descibe how to
This guide will descibe how to - Enable usage of full Qt 6.8 LTS environment - Configure Qt DS to work with the full Qt 6.8 LTS environment. - All steps are done on Linux and with command line
- Enable usage of full Qt 6.8 LTS environment
- Configure Qt DS to work with the full Qt 6.8 LTS environment.
- All steps are done on Linux and with command line


==== Pre-requisites ====
=== Pre-requisites ===
1. Build system must be functional, refer to: https://wiki.qt.io/Building_Qt_6_from_Git to get the build system up.
1. Build system must be functional, refer to: https://wiki.qt.io/Building_Qt_6_from_Git to get the build system up.


Line 17: Line 13:
https://github.com/qt-labs/qtquickdesigner-components/
https://github.com/qt-labs/qtquickdesigner-components/


==== Qt kit preparation ====
=== Qt kit preparation ===
First you need to compile and install the add-on lib (see above). The steps are described in the README.md of the add-on lib. Important to notice here is the '''-DCMAKE_INSTALL_PREFIX''' must point to the 'root' of your Qt environement which you are using, like:  
First you need to compile and install the add-on lib (see above). The steps are described in the README.md of the add-on lib. Important to notice here is the '''-DCMAKE_INSTALL_PREFIX''' must point to the 'root' of your Qt environement which you are using, like:  


Line 24: Line 20:
Once compiled and installed, check that the 'Studio' folder is populated into the kit:
Once compiled and installed, check that the 'Studio' folder is populated into the kit:


''
$ ls /home/parallels/Qt/6.8.3/gcc_arm64/qml/QtQuick/Studio
$ ls /home/parallels/Qt/6.8.3/gcc_arm64/qml/QtQuick/Studio
''


If the folder exists and is not empty: Congrats! preparation of the kit is now done!
If the folder exists and is not empty: Congrats! preparation of the kit is now done!


==== Qt Design Studio config ====
=== Modify Qt Design Studio config file ===
1. Open the QtDesignStudio.ini file with your favourite text editor. The file (on Linux) is located at:
 
''<Qt Design Studio installation>/share/qtcreator/QtProject/QtDesignStudio.ini''
 
2. Locate the line which has this:
 
''HideOptionCategories=C++, Debug, Designer, Kits, BuildAndRun, CPaster,''
 
3. Remove the "Kits" so the line would be:
 
''HideOptionCategories=C++, Debug, Designer, BuildAndRun, CPaster,''
 
4. Save the file
 
=== Configure the new kit to be used ===
 
# Open Qt Design Studio and create project, you should now be at the workspace
# Locate the cogwheel at the bottom left corner and click it, you should have the environment settings open
# Click "Manage Kits..." button on top of the screen, you should now have the preferences dialog open wih "Kits" view being open
# Open the tab 'Qt Versions' to add new Qt version
## Click on 'Add..'
## Locate the qmake of the Qt to be used (e.g. ~/Qt/6.8.3/gcc_arm64/bin/qmake) and select that. It will assign that Qt to be available
## Click 'Apply' or things won't be persistent
## Click on 'Kits' tab to change view and then click 'Add', you get a 'unnamed' entry to the 'manual' section on the dialog
## Assign a name (e.g. Qt-6.8.3-big) to it
## Locate "Qt version" on the dialog and from the drop-down , select the Qt version you create in step 2.
## Click "OK"
## Kit is now configured, click 'Return to design' to get back to your workspace
# In the bottom toolbar of the Qt Design Studio you see a dropdown menu which reads 'Desktop Qt 6.8.5' or alike. Click that and select your new Qt version which you created in part 4.
# Verify that player runs - click on "Run App" icon. If you see the app running, you have completed the steps!
 
=== Using custom player (puppet) ===
This guide does not cover situation where a custom QmlPuppet (Qt DS project runner) is being used, this might happen if the version number difference between used Qt and the Qt that Qt DS has is too big.

Latest revision as of 16:38, 20 March 2026

Using Qt Design Studio with real Qt environment

Typically Qt Design Studio does not directly integrate with a real Qt environment, as tooling cannot cope with vast changes that might be there in the real Qt. This is why Qt Design Studio is delivered with a purpose-built minified Qt environment.

Disclaimer: Using a full Qt exposes all QML types to Qt Design Studio and some might not work right. Qt DS RnD is not responsible for such issues.

This guide will descibe how to - Enable usage of full Qt 6.8 LTS environment - Configure Qt DS to work with the full Qt 6.8 LTS environment. - All steps are done on Linux and with command line

Pre-requisites

1. Build system must be functional, refer to: https://wiki.qt.io/Building_Qt_6_from_Git to get the build system up.

2. Grab a copy of Qt DS' add-on library sources called 'qtquickdesigner-components' from here (afterwards referred as "add-on lib"):

https://github.com/qt-labs/qtquickdesigner-components/

Qt kit preparation

First you need to compile and install the add-on lib (see above). The steps are described in the README.md of the add-on lib. Important to notice here is the -DCMAKE_INSTALL_PREFIX must point to the 'root' of your Qt environement which you are using, like:

/home/parallels/Qt/6.8.3/gcc_arm64

Once compiled and installed, check that the 'Studio' folder is populated into the kit:

$ ls /home/parallels/Qt/6.8.3/gcc_arm64/qml/QtQuick/Studio

If the folder exists and is not empty: Congrats! preparation of the kit is now done!

Modify Qt Design Studio config file

1. Open the QtDesignStudio.ini file with your favourite text editor. The file (on Linux) is located at:

<Qt Design Studio installation>/share/qtcreator/QtProject/QtDesignStudio.ini

2. Locate the line which has this:

HideOptionCategories=C++, Debug, Designer, Kits, BuildAndRun, CPaster,

3. Remove the "Kits" so the line would be:

HideOptionCategories=C++, Debug, Designer, BuildAndRun, CPaster,

4. Save the file

Configure the new kit to be used

  1. Open Qt Design Studio and create project, you should now be at the workspace
  2. Locate the cogwheel at the bottom left corner and click it, you should have the environment settings open
  3. Click "Manage Kits..." button on top of the screen, you should now have the preferences dialog open wih "Kits" view being open
  4. Open the tab 'Qt Versions' to add new Qt version
    1. Click on 'Add..'
    2. Locate the qmake of the Qt to be used (e.g. ~/Qt/6.8.3/gcc_arm64/bin/qmake) and select that. It will assign that Qt to be available
    3. Click 'Apply' or things won't be persistent
    4. Click on 'Kits' tab to change view and then click 'Add', you get a 'unnamed' entry to the 'manual' section on the dialog
    5. Assign a name (e.g. Qt-6.8.3-big) to it
    6. Locate "Qt version" on the dialog and from the drop-down , select the Qt version you create in step 2.
    7. Click "OK"
    8. Kit is now configured, click 'Return to design' to get back to your workspace
  5. In the bottom toolbar of the Qt Design Studio you see a dropdown menu which reads 'Desktop Qt 6.8.5' or alike. Click that and select your new Qt version which you created in part 4.
  6. Verify that player runs - click on "Run App" icon. If you see the app running, you have completed the steps!

Using custom player (puppet)

This guide does not cover situation where a custom QmlPuppet (Qt DS project runner) is being used, this might happen if the version number difference between used Qt and the Qt that Qt DS has is too big.