Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-109008

Qt Quick example .pro files aren't set up for "import shared" in QML




      $ cd qtdeclarative/examples/quick/draganddrop
      $ qmake
      $ make
      $ ./draganddrop 
      [     0.000 W] default unknown - qrc:/qt/qml/draganddrop/draganddrop.qml:5:1: module "shared" is not installed 
           import shared as Examples 

      (same thing in other examples too)

      Aren't we doing RTA testing on examples? We should test the builds both ways: qmake and cmake, for as long as we keep supporting qmake.

      Ideally whatever change caused this would not have made it through CI, but I'm not sure if we have any mechanism to prevent it there.

      I wish we could use import "../shared" as Examples so that it's possible to just run the qml file without having to build and package resources at all. But of course it's uglier, and not a pattern for users to copy.

      Currently you just have to know that running the QML is impossible if it uses "shared" components, and qmake doesn't work either: cmake is the only way.

      Well I guess this is because we "don't support" building examples in the source tree; but it used to work.


        No reviews matched the request. Check your Options in the drop-down menu of this sections header.



            qt.team.quick.subscriptions Qt Quick and Widgets Team
            srutledg Shawn Rutledge
            0 Vote for this issue
            1 Start watching this issue



              Gerrit Reviews

                There are no open Gerrit changes