Qt Quick Designer - add list of values to component properties



  • 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



  • 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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.