Examples won't run on Qt4 #11

Closed
opened 2012-04-06 16:36:14 +00:00 by mdkcore0 · 3 comments
mdkcore0 commented 2012-04-06 16:36:14 +00:00 (Migrated from github.com)

There are the need to change "import QtQuick 2.0" to "import QtQuick 1.1" when using Qt4.

If it is the correct behavior to follow (manually change the import) we must mention it on README.

There are the need to change "import QtQuick 2.0" to "import QtQuick 1.1" when using Qt4. If it is the correct behavior to follow (manually change the import) we must mention it on README.
tnoleto commented 2012-04-07 14:41:41 +00:00 (Migrated from github.com)

The branch tnoleto-fix-examples has a patch which enables all the examples to run both either on Qt4 or Qt5. It uses a different "main-qt[4|5].qml" for each version. The app launcher code does basically the following:

  1. Reads GameWindow.qml file contents
  2. Checks the Qt version being used and prepends the correct QtQuick import version to the contents string
  3. When main-qtX.qml file is loaded, creates dynamically an object from this string as a child of the main's toplevel item.

It is sort of a workaround, but does the trick.

The branch tnoleto-fix-examples has a patch which enables all the examples to run both either on Qt4 or Qt5. It uses a different "main-qt[4|5].qml" for each version. The app launcher code does basically the following: 1) Reads GameWindow.qml file contents 2) Checks the Qt version being used and prepends the correct QtQuick import version to the contents string 3) When main-qtX.qml file is loaded, creates dynamically an object from this string as a child of the main's toplevel item. It is sort of a workaround, but does the trick.
tnoleto commented 2012-04-07 14:44:55 +00:00 (Migrated from github.com)

By the way, that branch has also a patch which allows shadow build. It means that we can have on build tree for each Qt version at the same time. However, since we can export only one QML_IMPORT_PATH per environment, we need to run each build from different terminals.

By the way, that branch has also a patch which allows shadow build. It means that we can have on build tree for each Qt version at the same time. However, since we can export only one QML_IMPORT_PATH per environment, we need to run each build from different terminals.
tnoleto commented 2012-04-09 19:02:16 +00:00 (Migrated from github.com)

Fixed by commit 3012b600bee63010d82025a112c5059c9523efa4

Fixed by commit 3012b600bee63010d82025a112c5059c9523efa4
Commenting is not possible because the repository is archived.
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mdkcore/Quasi-Engine#11
No description provided.