Skip to content

Instantly share code, notes, and snippets.

@ivanelson
Created May 2, 2025 23:50
Show Gist options
  • Select an option

  • Save ivanelson/a0927ea23c9f397acc738abc223b7a41 to your computer and use it in GitHub Desktop.

Select an option

Save ivanelson/a0927ea23c9f397acc738abc223b7a41 to your computer and use it in GitHub Desktop.
main.qml para analisar
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