Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Qt Designer - QML file creation
Forum Updated to NodeBB v4.3 + New Features

Qt Designer - QML file creation

Scheduled Pinned Locked Moved QML and Qt Quick
6 Posts 4 Posters 2.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cmessineo
    wrote on 22 Jun 2012, 02:39 last edited by
    #1

    Hi, when I add a new QML file in the designer to a project, the top of the file has this line in it:

    import QtQuick 1.0

    I'm not sure if this is doable, but is there a way to change this behavior and have another import line added below.

    Something like
    import QtQuick 1.0
    import MyModule 1.0

    Thanks

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tucnak
      wrote on 22 Jun 2012, 08:40 last edited by
      #2

      What is the question?

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sierdzio
        Moderators
        wrote on 22 Jun 2012, 08:43 last edited by
        #3

        He wants to change the default file template in Qt Creator.

        (Z(:^

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tucnak
          wrote on 22 Jun 2012, 08:48 last edited by
          #4

          [quote author="sierdzio" date="1340354631"]He wants to change the default file template in Qt Creator.[/quote]

          Ah. You can't do it with built QtC, you should rebuild QtC with custom templates.

          1 Reply Last reply
          0
          • T Offline
            T Offline
            tobias.hunger
            wrote on 24 Jun 2012, 15:35 last edited by
            #5

            The new file qml template seems to be indeed hardcoded in src/plugins/qmljseditor/qmlfilewizard.cpp.

            It might be a good idea to file a feature request at http://bugreports.qt-project.org/ to have this changed.

            1 Reply Last reply
            0
            • C Offline
              C Offline
              cmessineo
              wrote on 24 Jun 2012, 16:13 last edited by
              #6

              Thanks for answering my question. I also found template files that can be updated in QtCreator/share/qtcreator/templates/qtquickapp/qml/

              1 Reply Last reply
              0

              1/6

              22 Jun 2012, 02:39

              • Login

              • Login or register to search.
              1 out of 6
              • First post
                1/6
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved