Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-6683

mainFile setting in qmlproject file does not cause Creator to always run that file

XMLWordPrintable

      When you create a Qt Quick UI project, you will get a qmlproject file with this line in it:

      mainFile: "qmlmain.qml"

      My understanding is that regardless which file you have loaded in the editor, this line should tell Creator which one to run. But in fact if another file from your app is loaded, Creator will try to run that instead. You can test with the attached example: load the project, then load Content.qml in the editor and try to run or debug. You will get a very small window because Content.qml is anchored to its parent rather than setting its own size, and Creator is running that one. You can see something like this in the application output too:

      Starting /path/to/qmlscene -qmljsdebugger=port:3768,block -I /path/to/qtbase/imports /home/rutledge/bugs/qmlmain/Content.qml

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

            kkohne Kai Köhne
            srutledg Shawn Rutledge
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes