Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

TextField



  • Hello,
    I would like to read one of the data of my model in a TextField but nothing is displayed. Could you please help me?

    Here is the template:

    QHash<int, QByteArray> names;
    names[nameRole] = "nom";
    names[rue] = "Rue";
    names[code_postal] = "Code_postal";
    names[tel] = "Tel";
    names[email] = "Email";
    names[fax] = "Fax";
    Code qml

    TextField{
    id:textField
    text:nom
    font.pointSize: 12
    //visible: checkBox.checked
    onTextChanged: controller.text = text
    }

    but when I use a listview it works very well
    Thanks


  • Qt Champions 2017

    What is controller.text here ? Complete example would help to help you.


Log in to reply