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 Quick Designer - add list of values to component properties
Forum Updated to NodeBB v4.3 + New Features

Qt Quick Designer - add list of values to component properties

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 566 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.
  • B Offline
    B Offline
    Bochnak
    wrote on last edited by Bochnak
    #1

    Hello, is it possible to add table or something like list of values to component properties in Qt Quick Designer as shown on picture below?
    Thanks in advance for any information.

    Radim

    alt text

    1 Reply Last reply
    0
    • T Offline
      T Offline
      Tim.Jenssen
      wrote on last edited by Tim.Jenssen
      #2

      Put a file in you: <qtcreator_install_ directory>\share\qtcreator\qmldesigner\propertyEditorQmlSources\MyComponentSpecifics.qml

      import QtQuick 2.1
      import HelperWidgets 2.0
      import QtQuick.Layouts 1.0
      
      Column {
          anchors.left: parent.left
          anchors.right: parent.right
      
          Section {
              anchors.left: parent.left
              anchors.right: parent.right
              caption: qsTr("MyComponent")
      
              SectionLayout {
                  Label {
                      text: qsTr("Value 1")
                  }
      
                  SecondColumnLayout {
                      LineEdit {
                          //backendValue: backendValues.layoutDirection
                      }
                  }
      
                  Label {
                      text: qsTr("Value 2")
                  }
      
                  SecondColumnLayout {
                      LineEdit {
      
                      }
      
                      ExpandingSpacer {
                      }
                  }
              }
          }
      }
      
      

      to see what is possible look at <qtcreator_install_ directory>\share\qtcreator\qmldesigner\propertyEditorQmlSources\QtQuick or other specifics files in QtQuickControls 2 https://github.com/qt/qtquickcontrols2/tree/dev/src/imports/controls/designer

      also see https://forum.qt.io/topic/39415/qml-designer-custom-properties

      1 Reply Last reply
      0

      • Login

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