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. Where can I find (and modify) the source code for QT quick elements

Where can I find (and modify) the source code for QT quick elements

Scheduled Pinned Locked Moved Solved QML and Qt Quick
4 Posts 2 Posters 1.6k Views
  • 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.
  • M Offline
    M Offline
    Morgan Liu-Packard
    wrote on last edited by Morgan Liu-Packard
    #1

    Re: Where can I find the source code of the Qt Quick elements ?

    The above is a very old thread about this, but I'm guessing this have changed in the past ten years, so starting a new thread.

    I'm learning QML, and would like to read and make experimental edits to the source code of the elements I'm using -- starting with ComboBox. My QT install is at ~/Qt5.15.2/. In my Qt Creator project, all of the paths (Qt5Core_DIR, Qt5Quick_DIR, etc), point to paths beneath ~/Qt5.15.2. There are dozens of files called ComboBox.qml. Some of them are pure QML, some of them use QtQuick.Templates, which I believe are C++ files.

    Questions --

    1. Among the dozens of ComboBox.qml files in my installation, how can I find the actual sources being used for my application?
    2. Once I identify the correct sources, can I simple edit them and see changes reflected after I build my app, or do the QML files get compiled cached somewhere?
    3. Is there documentation I can look at which will answer these questions?
    jeremy_kJ 1 Reply Last reply
    0
    • M Morgan Liu-Packard

      Re: Where can I find the source code of the Qt Quick elements ?

      The above is a very old thread about this, but I'm guessing this have changed in the past ten years, so starting a new thread.

      I'm learning QML, and would like to read and make experimental edits to the source code of the elements I'm using -- starting with ComboBox. My QT install is at ~/Qt5.15.2/. In my Qt Creator project, all of the paths (Qt5Core_DIR, Qt5Quick_DIR, etc), point to paths beneath ~/Qt5.15.2. There are dozens of files called ComboBox.qml. Some of them are pure QML, some of them use QtQuick.Templates, which I believe are C++ files.

      Questions --

      1. Among the dozens of ComboBox.qml files in my installation, how can I find the actual sources being used for my application?
      2. Once I identify the correct sources, can I simple edit them and see changes reflected after I build my app, or do the QML files get compiled cached somewhere?
      3. Is there documentation I can look at which will answer these questions?
      jeremy_kJ Offline
      jeremy_kJ Offline
      jeremy_k
      wrote on last edited by
      #2

      @Morgan-Liu-Packard said in Where can I find (and modify) the source code for QT quick elements:

      Re: Where can I find the source code of the Qt Quick elements ?

      The above is a very old thread about this, but I'm guessing this have changed in the past ten years, so starting a new thread.

      Gitorious is long gone. Use https://github.com/qt/qt5 or https://code.qt.io/cgit/ instead. @SGaist's suggestions to download via the website or installer remain valid.

      I'm learning QML, and would like to read and make experimental edits to the source code of the elements I'm using -- starting with ComboBox. My QT install is at ~/Qt5.15.2/. In my Qt Creator project, all of the paths (Qt5Core_DIR, Qt5Quick_DIR, etc), point to paths beneath ~/Qt5.15.2. There are dozens of files called ComboBox.qml. Some of them are pure QML, some of them use QtQuick.Templates, which I believe are C++ files.

      Ignore the versions in the Qt Creator directory.

      <Qt version>/<compiler>/qml/QtQuick/Controls/ComboBox.qml is the QtQuick Controlls 1.x version.

      <Qt version>/<compiler>/qml/QtQuick/Controls.2/*/ComboBox.qml are implementations of various styles. QtQuick.Templates provide non-visual structure for the style implementations to build on.

      Questions --

      1. Among the dozens of ComboBox.qml files in my installation, how can I find the actual sources being used for my application?

      See above.

      1. Once I identify the correct sources, can I simple edit them and see changes reflected after I build my app, or do the QML files get compiled cached somewhere?

      Editing in place will probably work. Defining a custom style is a better idea.

      1. Is there documentation I can look at which will answer these questions?

      https://doc.qt.io/qt-5/qtquickcontrols-index.html is a user level guide for Controls.
      https://wiki.qt.io/Main goes into more detail about modifying Qt.
      https://qmlbook.github.io/index.html is an excellent introduction to using Qt and QML.

      Asking a question about code? http://eel.is/iso-c++/testcase/

      M 1 Reply Last reply
      1
      • jeremy_kJ jeremy_k

        @Morgan-Liu-Packard said in Where can I find (and modify) the source code for QT quick elements:

        Re: Where can I find the source code of the Qt Quick elements ?

        The above is a very old thread about this, but I'm guessing this have changed in the past ten years, so starting a new thread.

        Gitorious is long gone. Use https://github.com/qt/qt5 or https://code.qt.io/cgit/ instead. @SGaist's suggestions to download via the website or installer remain valid.

        I'm learning QML, and would like to read and make experimental edits to the source code of the elements I'm using -- starting with ComboBox. My QT install is at ~/Qt5.15.2/. In my Qt Creator project, all of the paths (Qt5Core_DIR, Qt5Quick_DIR, etc), point to paths beneath ~/Qt5.15.2. There are dozens of files called ComboBox.qml. Some of them are pure QML, some of them use QtQuick.Templates, which I believe are C++ files.

        Ignore the versions in the Qt Creator directory.

        <Qt version>/<compiler>/qml/QtQuick/Controls/ComboBox.qml is the QtQuick Controlls 1.x version.

        <Qt version>/<compiler>/qml/QtQuick/Controls.2/*/ComboBox.qml are implementations of various styles. QtQuick.Templates provide non-visual structure for the style implementations to build on.

        Questions --

        1. Among the dozens of ComboBox.qml files in my installation, how can I find the actual sources being used for my application?

        See above.

        1. Once I identify the correct sources, can I simple edit them and see changes reflected after I build my app, or do the QML files get compiled cached somewhere?

        Editing in place will probably work. Defining a custom style is a better idea.

        1. Is there documentation I can look at which will answer these questions?

        https://doc.qt.io/qt-5/qtquickcontrols-index.html is a user level guide for Controls.
        https://wiki.qt.io/Main goes into more detail about modifying Qt.
        https://qmlbook.github.io/index.html is an excellent introduction to using Qt and QML.

        M Offline
        M Offline
        Morgan Liu-Packard
        wrote on last edited by
        #3

        @jeremy_k Thanks so much for your reply! Much appreciated. If I understand correctly, there are actually two combobox.qml files which are used to create the ComboBox type, the main one under Controls, and then a style-related on under Controls.2. Is this correct?

        M 1 Reply Last reply
        0
        • M Morgan Liu-Packard

          @jeremy_k Thanks so much for your reply! Much appreciated. If I understand correctly, there are actually two combobox.qml files which are used to create the ComboBox type, the main one under Controls, and then a style-related on under Controls.2. Is this correct?

          M Offline
          M Offline
          Morgan Liu-Packard
          wrote on last edited by
          #4

          @Morgan-Liu-Packard What I wrote above doesn't seem to be true. It looks to me like <Qt version>/<compiler>/qml/QtQuick/Controls/ComboBox.qml is the 1.x version (docs here), and <Qt version>/<compiler>/qml/QtQuick/Controls.2/ComboBox.qml is the 2.x version (docs here).

          1 Reply Last reply
          0
          • M Morgan Liu-Packard has marked this topic as solved on

          • Login

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