initial commit to split repos
This commit is contained in:
50
qml/CustomInputField.qml
Normal file
50
qml/CustomInputField.qml
Normal file
@@ -0,0 +1,50 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
Rectangle {
|
||||
property alias logoSrc: logoImage.source
|
||||
property alias placeHolderText: textInput.placeholderText
|
||||
property alias text: textInput.text
|
||||
|
||||
Rectangle
|
||||
{
|
||||
id: logoRect
|
||||
width: parent.width * 0.1
|
||||
height: parent.height
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
color: "transparent"
|
||||
Image
|
||||
{
|
||||
id: logoImage
|
||||
anchors.fill: parent
|
||||
fillMode: Image.PreserveAspectFit
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
z: parent.z + 1
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle
|
||||
{
|
||||
id: inputRect
|
||||
width: parent.width * 0.9
|
||||
height: parent.height
|
||||
anchors.left: logoRect.right
|
||||
anchors.top: parent.top
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
color: "transparent"
|
||||
radius: parent.radius
|
||||
TextField
|
||||
{
|
||||
id: textInput
|
||||
anchors.fill: parent
|
||||
onPressed: textInput.forceActiveFocus()
|
||||
background: Rectangle{
|
||||
width: inputRect.width
|
||||
height:inputRect.height
|
||||
radius: inputRect.radius
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user