OlivierLDff / Qaterial

🧩 Collection of Material Components based on QtQuickControls2.
https://olivierldff.github.io/Qaterial/
MIT License
291 stars 54 forks source link

Dialog Manager How to?? #113

Closed celibol closed 3 years ago

celibol commented 3 years ago

How to 2 line TextField with dialogManager??

For Ex:

First Line NAME field Second Line SURNAME field

How to read with DİalogManager??

OlivierLDff commented 3 years ago

You need to create your own dialog, put it in a component, and open it with DialogManager.openFromComponent. If you have idea of a better API, I'm listening. Have a nice day

celibol commented 3 years ago

function openFromComponent(comp)

Comp is ITEM or COMPONENT etc...

Its true?

OlivierLDff commented 3 years ago

comp is expected to be a Component

celibol commented 3 years ago
Component {
    id: _editComponent

    Qaterial.TextField{
        id: _fiyat

        width: parent.width
        Layout.fillWidth: true
        enabled: true
        title: "Fiyatı"
        placeholderText: "Ürün Fiyatını Girin"
        validator: DoubleValidator{notation: DoubleValidator.StandardNotation}
        leadingIconInline: true
        text: ""
        inputMethodHints: Qt.ImhSensitiveData
        trailingContent: Qaterial.TextFieldButtonContainer{
            Qaterial.TextFieldClearButton {}
        }
    } // Fiyat
}

function editLine(){ Qaterial.DialogManager.openFromComponent(_editComponent) } function menuClicked(ID){ switch(ID){ case 4: editLine(); break; // Edit } }

.....

No any eror

But dont work

celibol commented 3 years ago

WOWWWW

It's working