Warning, /rolisteam/rolisteam/src/libraries/charactersheet/qml/Rolisteam/SelectFieldv1.qml is written in an unsupported language. File is not indexed.

0001 import QtQuick 2.0
0002 import QtQuick 2.4
0003 import QtQuick.Controls 1.3
0004 
0005 Rectangle {
0006     id:root
0007     property string text: ""
0008     property alias currentIndex : selectvalues.currentIndex
0009     property alias currentText: selectvalues.currentText
0010     property alias count: selectvalues.count
0011     property alias combo: selectvalues
0012     property alias style: selectvalues.style
0013 
0014     property color textColor:"black"
0015     property int hAlign: 0
0016     property int vAlign: 0
0017     property bool readOnly: false
0018 
0019     property alias availableValues: selectvalues.model
0020     property bool clippedText: false
0021 
0022     ComboBox {
0023         id: selectvalues
0024         anchors.fill: parent
0025         enabled: !root.readOnly
0026         onCountChanged: {
0027             currentIndex=selectvalues.find(root.text)
0028         }
0029     }
0030     onTextChanged: {
0031         if(selectvalues.count>0)
0032         {
0033             currentIndex=selectvalues.find(text)
0034         }
0035     }
0036 }
0037