image title shows after changing imageGet
This commit is contained in:
parent
f1378cc1ff
commit
85e260c874
2 changed files with 4 additions and 4 deletions
|
@ -17,7 +17,7 @@ class ImageSqlModel : public QSqlTableModel
|
||||||
QML_ELEMENT
|
QML_ELEMENT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ImageSqlModel(QObject *parent = 0);
|
ImageSqlModel(QObject *parent = 0);
|
||||||
|
|
||||||
int id() const;
|
int id() const;
|
||||||
QString title() const;
|
QString title() const;
|
||||||
|
|
|
@ -124,7 +124,7 @@ Item {
|
||||||
Layout.rightMargin: 20
|
Layout.rightMargin: 20
|
||||||
|
|
||||||
placeholderText: "Song Title..."
|
placeholderText: "Song Title..."
|
||||||
text: "idk"
|
text: image.title
|
||||||
padding: 10
|
padding: 10
|
||||||
/* onEditingFinished: updateTitle(text); */
|
/* onEditingFinished: updateTitle(text); */
|
||||||
}
|
}
|
||||||
|
@ -151,7 +151,7 @@ Item {
|
||||||
Layout.preferredHeight: Layout.preferredWidth / 16 * 9
|
Layout.preferredHeight: Layout.preferredWidth / 16 * 9
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
source: image
|
source: image.filePath
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
id: botEmpty
|
id: botEmpty
|
||||||
|
@ -163,7 +163,7 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeImage(image) {
|
function changeImage(image) {
|
||||||
root.image = image.filePath;
|
root.image = image;
|
||||||
print(image.filePath.toString());
|
print(image.filePath.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue