QML Extension Library + Tabbed Touch UI needs manual configuration

Bug #1215913 reported by Jamie Strandboge
40
This bug affects 8 people
Affects Status Importance Assigned to Milestone
qtcreator (Ubuntu)
Fix Released
Medium
Unassigned
Saucy
Fix Released
Medium
Unassigned

Bug Description

If I start a new project and choose QML Extension Library + Tabbed Touch UI, it needs manual configuration to build and run the app. Steps to reproduce:

1. Create a new project in qtcreator, select Ubuntu/QML Extension Library + Tabbed Touch UI
2. name it testcompiled1
3. 'Configure Project' dialog pops up. Click 'Configure Project' in lower right

At this point, I should be able to click the Green triangle in the lower left of qtcreator and run the test application. However, I cannot because more configuration is needed. Specifically, a shadow directory is used for the build but the 'app' directory is not copied over into it, and the 'qmldir' is not either. Also, because we are importing a module, we must pass -I to qmlscene in the run step. Specific steps:

4. click Projects in the left hand column. This brings up the Build Settings dialog. If not, click 'Build' under 'Desktop' at the top.
5. In the Build Settings dialog, add a Build Step:
 a) click Add Build Step and choose 'Custom Process Step
 b) set this build step up with the following:
   Command: cp
   Arguments: -a %{sourceDir}/app %{buildDir}
   Working directory: %{buildDir}
6. In the Build Settings dialog, add another Build Step:
 a) click Add Build Step and choose 'Custom Process Step
 b) set this build step up with the following:
   Command: cp
   Arguments: -f %{sourceDir}/backend/modules/testcompiled1/qmldir %{buildDir}/backend/modules/testcompiled1
   Working directory: %{buildDir}
7. At the top of the qtcreator window, click 'Run' under 'Desktop'. This shows the 'Run Settings'
8. Under 'Run', use the following:
   Command: qmlscene
   Arguments: -I backend/modules app/testcompiled1.qml
   Working directory: %{buildDir}

At this point, you should be able to build and run the program with the three big buttons at the lower left (Run, Debug run, Build) (though debug run doesn't actually work-- filing another bug)

Tags: appstore
tags: added: appstore
description: updated
description: updated
description: updated
Zoltan Balogh (bzoltan)
Changed in qtcreator (Ubuntu Saucy):
assignee: nobody → Zoltan Balogh (bzoltan)
status: New → Confirmed
Zoltan Balogh (bzoltan)
Changed in qtcreator (Ubuntu Saucy):
assignee: Zoltan Balogh (bzoltan) → Juhapekka Piiroinen (juhapekka-piiroinen)
importance: Undecided → Medium
Changed in qtcreator (Ubuntu Saucy):
assignee: Juhapekka Piiroinen (juhapekka-piiroinen) → nobody
Revision history for this message
ybon (yohanboniface) wrote :

I've created a project with the "QML Extenstion Library + Tabbed UI" template, then I've followed the step by step described above, but I'm still unable to run the project.
If I try to run the project (click on green arrow or Ctrl-R) from QtCreator, I see no sign of activity and no output on the console.
When I look at the {buildDir}, I can see that the project has been built.
If I try to run from the Terminal with command qmlscene -I backend/modules/ app/testcompiled1.qml, here is what I get:

Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 14: reading configurations from ~/.fonts.conf is deprecated.
file:///home/ybon/Code/qt/testcompiled1-build/app/testcompiled1.qml:30 Type HelloTab unavailable
file:///home/ybon/Code/qt/testcompiled1-build/app/ui/HelloTab.qml:3 module "testcompiled1" is not installed

When looking at the {buildDir} I can see no backend/modules folder, and the .so file is located in backend/testcompiled1/.

Then, if I change the import path to "backend/", I got it to work (qmlscene opens): qmlscene -I backend/ app/testcompiled1.qml though it still doesn't when ran from QtCreator.

I'm missing C++ ecosystem and conventions knowledge to be able to know what is the good fix, but I thought it was useful to mention it here.

Revision history for this message
ybon (yohanboniface) wrote :

Edit: if I change (in step 6)

-f %{sourceDir}/backend/modules/testcompiled1/qmldir %{buildDir}/backend/modules/testcompiled1

by

-f %{sourceDir}/backend/modules/testcompiled1/qmldir %{buildDir}/backend/testcompiled1

I can now run from QtCreator.

Revision history for this message
Niklas Wenzel (nikwen) wrote :

Well, I experienced the same bug today and I must admit that it was *very* annoying. It took some time until I found this bug report via Google.

Big thanks to Jamie Strandboge and ybon. If you use ybon's fix in addition to Jamie's solution, running the project will work.
Now I would even go so far as to suggest changing the importance of this bug to high.

Revision history for this message
Niklas Wenzel (nikwen) wrote :

I forgot to mention that in addition to ybon's fix I had to change this in step 8:

Arguments: -I backend/ app/testcompiled1.qml

Changed in qtcreator (Ubuntu):
status: Confirmed → Fix Released
Changed in qtcreator (Ubuntu Saucy):
status: Confirmed → Fix Released
Zoltan Balogh (bzoltan)
Changed in qtcreator (Ubuntu):
status: Fix Released → In Progress
Changed in qtcreator (Ubuntu Saucy):
status: Fix Released → In Progress
Revision history for this message
Benjamin Zeller (zeller-benjamin) wrote :

Fix is already in Trusty and needs to be backported

Revision history for this message
Zoltan Balogh (bzoltan) wrote :

I mark it released, please indicate if Saucy backport is needed.

Changed in qtcreator (Ubuntu):
status: In Progress → Fix Released
Changed in qtcreator (Ubuntu Saucy):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.