Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. import
    Log in to post

    • UNSOLVED QML qmake based application with shared libraries containing QML
      General and Desktop • qml qmake qrc import • • genner  

      1
      0
      Votes
      1
      Posts
      13
      Views

      No one has replied

    • UNSOLVED QML , imports and library/project organization
      QML and Qt Quick • qml qrc import qmldir • • genner  

      1
      0
      Votes
      1
      Posts
      24
      Views

      No one has replied

    • UNSOLVED calling a file from another?
      Qt for Python • qt for python import open qt files • • goingwtheflow  

      2
      0
      Votes
      2
      Posts
      114
      Views

      @goingwtheflow You have two .py files, each with their own main, hence standalone programs. How do you intend for them to interact? One would be better without the main. When you post code, please use the Code icon on the toolbar to make your code legible.
    • UNSOLVED Module is not installed error
      QML and Qt Quick • module import export plugin install extantion qml • • Helga  

      1
      0
      Votes
      1
      Posts
      269
      Views

      No one has replied

    • SOLVED How to import a QML file from a different Directory
      QML and Qt Quick • import • • Anita  

      5
      0
      Votes
      5
      Posts
      1465
      Views

      @raven-worx , @J-Hilk Thanks For the solution. It is working by importing the qml as "qrc:/../Test/ in main.qml.
    • UNSOLVED C++ Singleton import inside Qt Creator's QML Designer
      QML and Qt Quick • qml qt creator designer import singleton • • b2soft  

      2
      0
      Votes
      2
      Posts
      475
      Views

      I know this answer is a bit late, but one solution that comes to my mind is to separate UI from logic. Create one file (e.g. a ui.qml file) for your UI and use it in another qml file.
    • UNSOLVED I can not import anything in qml
      QML and Qt Quick • qml qt5 javascript import • • Dante Leoncini  

      3
      0
      Votes
      3
      Posts
      1141
      Views

      try to create a qmldir file, but it did not work look for the error but I found nothing that serves me. I do not know if it has to do with the fact that I'm not using a qrc file. in the ".pro" file, add a line to copy and paste the "qml" folder into the compiled directory. that's because I want the code jv and qml can be edited with any editor in the final version #Copia la carpeta "qml" dentro de la carpeta build copydata.commands = $(COPY_DIR) $$PWD/qml $$OUT_PWD first.depends = $(first) copydata export(first.depends) export(copydata.commands) QMAKE_EXTRA_TARGETS += first copydata
    • SOLVED Help to understand the necessity of this "import" statement in modified flatstyle example
      QML and Qt Quick • qml styles import flatstyle • • markugra  

      7
      0
      Votes
      7
      Posts
      1318
      Views

      @jpnurmi Great, thanks for your help!
    • Can't import QML component using QRC
      QML and Qt Quick • qml qrc import qqmlapplication components • • Jason Wright  

      7
      0
      Votes
      7
      Posts
      9030
      Views

      @Jason-Wright said in Can't import QML component using QRC: which then causes a lookup of Navigation.qml (and yeah, I did still have to give it an alias in the .qrc file, for some reason...) Not sure why I had to do this from my reading of the documentation, but it's at least a workable solution. Seems like QML only resolves components only with .qml extension. Your solution wokrs because import "./components" as Components imports the whole folder 'navigation'. Then you use the component Components.Navigation, which then is loaded by the engine as Navigation.qml.
    • SOLVED Import multiple libraries in Qt Creator 4.0.2
      General and Desktop • qt creator library import 4.0.2 • • tradeli  

      3
      0
      Votes
      3
      Posts
      2523
      Views

      @VRonin Thanks!
    • SOLVED How to import the "latest" versions of QtQuick.Controls and QtQuick.Controls.Styles?
      QML and Qt Quick • import modules versions • • glob  

      3
      0
      Votes
      3
      Posts
      9405
      Views

      Thanks J-P, that's exactly what I needed to know! I think I found an old example online that used the 1.x approach to styling, then tried to combine that with 2.x controls - and got myself in a tangle. I now understand how styling is meant to be applied in 2.x, and it's working just fine for me.
    • How to export Qt Creator app built on Ubuntu to OSX
      General and Desktop • creator osx ubuntu 14.04 import • • shellback3  

      4
      0
      Votes
      4
      Posts
      1314
      Views

      It's not just "yet another app" to learn. It's the current defacto version control system used by Qt, KDE, the linux kernel and many more projects. Even if you're the only developer, that's something you really want to learn to use.
    • SOLVED How to cope with the asynchronous-ness of Qt.import() ?
      QML and Qt Quick • qml javascript import asynchronous scope • • ronjouch  

      4
      0
      Votes
      4
      Posts
      1905
      Views

      Good news! My use case is actually well covered by simply using a regular .import "thing.js" as Thing. I don't need the specific namespace-less behavior of Qt.include; I just happened to miss .import when reading the doc, thus failing to understand that Qt.include is only a second import mechanism to be used instead of .import under very specific (documented) circumstances. → Doc might still deserve clarification of the async behavior, but my initial problem is gone with using .import. I updated the QTBUG
    • qrc:/main.qml:9 "gui/delegates/UePeopleItemDelegate.qml": no such directory error
      QML and Qt Quick • qml import • • MarkoSan  

      2
      0
      Votes
      2
      Posts
      2819
      Views

      @MarkoSan Following are the 2 ways to do it correctly, If loading main.qml from resource (i.e qrc) for eg. engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); You will need to add the complete path so that the main.qml file in qrc is able to find it. For eg. import "file:///home/someusername/gui/delegates" //import using complete path UePeopleItemDelegate { //using the loaded Component } If loading main.qml directly i.e from some local path for eg. engine.load(QUrl(QStringLiteral("main.qml"))). Note no qrc Here you can use the relative path in main.qml import "./gui/delegates" //import using relative path UePeopleItemDelegate { //using the loaded Component } Assuming the directory gui is present in same location that of main.qml as we have used "."
    • Import QML File from QRC
      QML and Qt Quick • qml qrc import • • Vostro162  

      5
      0
      Votes
      5
      Posts
      3751
      Views

      ahh okay thank you ^^
    • Difference in behaviour between addImportPath and qmlRegisterType
      General and Desktop • qml import addimportpath • • sdrobert  

      1
      0
      Votes
      1
      Posts
      511
      Views

      No one has replied

    • Importing resource files of an imported project in QT
      General and Desktop • qtcreator linux qmake cross compile pro file import chromium ressource • • MrGrj  

      1
      0
      Votes
      1
      Posts
      650
      Views

      No one has replied