Created
May 2, 2025 23:50
-
-
Save ivanelson/a0927ea23c9f397acc738abc223b7a41 to your computer and use it in GitHub Desktop.
main.qml para analisar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import QtQuick 6.9 | |
| import QtQuick.Controls 6.9 | |
| import QtQuick.Layouts | |
| ItemDelegate { | |
| id: taskDelegate | |
| width: parent.width | |
| height: 60 | |
| property var task | |
| signal editClicked | |
| ColumnLayout { | |
| anchors.fill: parent | |
| anchors.margins: 10 | |
| spacing: 5 | |
| Label { | |
| text: task ? String(task.titulo) : "Erro: Título não definido" | |
| font.bold: true | |
| } | |
| Label { text: task ? "Status: " + String(task.status) : "Erro: Status não definido" } | |
| Label { text: task && task.data_criacao ? "Criado em: " + Qt.formatDateTime(task.data_criacao, "dd/MM/yyyy hh:mm") : "Criado em: [Não definido]" } | |
| Label { text: task && task.data_conclusao ? "Concluído em: " + Qt.formatDateTime(task.data_conclusao, "dd/MM/yyyy hh:mm") : "Não concluído" } | |
| } | |
| MouseArea { | |
| anchors.fill: parent | |
| onClicked: editClicked() | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment