<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      QML Qt Quick Study Note --- No.2

      import與include類似
      如果不確定使用某種類型時(shí)應(yīng)當(dāng)導(dǎo)入哪個(gè)模塊, 可以使用Qt assisstant, 查看其所在的Qt Quick模塊, 如下:
      Text QML Type
      Specifies how to add formatted text to a scene. More...

       

      The generic form of a module import is as follows:

      import <ModuleIdentifier> <Version.Number> [as <Qualifier>]

       

      The <ModuleIdentifier> is an identifier specified in dotted URI (Uniform Resource Identifier, 統(tǒng)一資源標(biāo)志符) notation, which uniquely identifies the type namespace provided by the module.

      The <Version.Number> is a version of the form MajorVersion.MinorVersion which specifies which definitions of various object types and JavaScript resources will be made available due to the import.

      Example: import QtQuick 2.0

       

      The <Qualifier> is an optional local namespace identifier into which the object types and JavaScript resources provided by the module will be installed, if given.

      If omitted, the object types and JavaScript resources provided by the module will be installed into the global namespace.

      Example: import QtQuick 2.0 as Quick

      This import allows multiple modules which provide conflicting type names to be imported at the same time,

      however since each usage of a type provided by a module which was imported into a qualified namespace must be preceded by the qualifier,

      the conflict is able to be resolved unambiguously by the QML engine.

      An example of client code which creates a rectangle after using a qualified module import is as follows:

      
      
        import QtQuick 2.0 as Quick
      
      
        Quick.Rectangle {
            width: 200
            height: 100
            color: "red"
        }

      Importing into a Qualified Local Namespace

      The import statement may optionally use the "as" keyword to specify that the types should be imported into a particular document-local namespace.

      If a namespace is specified, then any references to the types made available by the import must be prefixed by the local namespace qualifier.

      Below, the QtQuick module is imported into the namespace "CoreItems".

      Now, any references to types from the QtQuick module must be prefixed with the CoreItems name:

      
      
        import QtQuick 2.0 as CoreItems
      
      
        CoreItems.Rectangle {
            width: 100; height: 100
      
      
            CoreItems.Text { text: "Hello, world!" }
      
      
            // WRONG! No namespace prefix - the Text type won't be found
            Text { text: "Hello, world!" }
        }

      A namespace acts as an identifier for a module within the scope of the file.

      The namespace does not become an attribute of the root object that can be referred to externally as can be done with properties, signals and methods.

      The namespaced import is useful if there is a requirement to use two QML types that have the same name but are located in different modules.

      In this case the two modules can be imported into different namespaces to ensure the code is referring to the correct type:

      
      
        import QtQuick 2.0 as CoreItems
        import "../textwidgets" as MyModule
      
      
        CoreItems.Rectangle {
            width: 100; height: 100
      
      
            MyModule.Text { text: "Hello from my custom text item!" }
            CoreItems.Text { text: "Hello from Qt Quick!" }
        }

      Directory Imports

      A directory which contains QML documents may also be imported directly in a QML document.

      This provides a simple way for QML types to be segmented into reusable groupings: directories on the filesystem.

      The generic form of a directory import is as follows:

       

      import "<DirectoryPath>" [as <Qualifier>]

       Note: Import paths are network transparent: applications can import documents from remote paths just as simply as documents from local paths.

      See the general URL resolution rules for Network Transparency in QML documents.

      If the directory is remote, it must contain a directory import listing qmldir file as the QML engine cannot determine the contents of a remote directory if that qmldir file does not exist.

       

      JavaScript Resource Imports

      JavaScript resources may be imported directly in a QML document. Every JavaScript resource must have an identifier by which it is accessed.

      The generic form of a JavaScript resource import is as follows:

       

        import "<JavaScriptFile>" as <Identifier>

      
      

      Note that the <Identifier> must be unique within a QML document, unlike the local namespace qualifier which can be applied to module imports.

      ......

       

      posted @ 2022-01-25 16:49  HenryLiuY  閱讀(82)  評論(0)    收藏  舉報(bào)
      主站蜘蛛池模板: 亚洲成色精品一二三区| 精品免费看国产一区二区| 久久精品欧美日韩精品| 亚洲曰韩欧美在线看片| 天堂V亚洲国产V第一次| 亚洲av日韩av永久无码电影| 九九热爱视频精品视频| 欧美性猛交xxxx乱大交丰满| 南城县| 日韩在线视频线观看一区| 国产成人精品一区二区无| 成年无码av片在线蜜芽| 少妇性bbb搡bbb爽爽爽欧美| 日本熟妇XXXX潮喷视频| 国产在线视频一区二区三区| 精品国产一区二区三区性色| 麻豆成人传媒一区二区| 思茅市| 真实单亲乱l仑对白视频| 国产成人一区二区三区在线观看| 国产一区二区日韩在线| 国产精品一区二区三区自拍| 又黄又爽又色的少妇毛片| 不卡一区二区国产在线| 亚洲精品麻豆一二三区| xx性欧美肥妇精品久久久久久| 黄色一级片一区二区三区| 久久毛片少妇高潮| 双城市| av永久免费网站在线观看| 99国产精品欧美一区二区三区| 激情综合网激情国产av| 国产成人无码免费视频在线| 噶尔县| 久久av无码精品人妻出轨| 亚洲成aⅴ人在线观看| 亚洲一区二区三区18禁| 国产欧美日韩精品丝袜高跟鞋| 美女爽到高潮嗷嗷嗷叫免费网站| 精品亚洲女同一区二区| 亚洲首页一区任你躁xxxxx|