Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. TextField

TextField

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 238 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    Oussou
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

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

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved