日志
-
2019-05-24 10:25
-
使用Qt5.6+VS2013在原来的工程中新增一个项目,编译的时候总是报如下问题:
阅读全文»分类:默认分类|回复:0|浏览:709
There's no Qt version assigned to this project for platform Win32. Please user the 'change Qt version' feature and choose a valid Qt version for this platform.如下图
解决办法:
1.选中项目右键,Qt Project Settings
2.选择要编译成的x64还是Win32
-
2019-05-13 18:46
-
使用Qt自带例子+QSortFilterProxyModel来实现搜索。
阅读全文»分类:默认分类|回复:0|浏览:560
官方介绍:For hierarchical models, the filter is applied recursively to all children. If a parent item doesn't match the filter, none of its children will be
shown.
默认情况下QSortFilterProxyModel的Filtering功能,如果父节点不匹配的话,子节点也不会被搜索,这种情况下对绝大多数树的搜索不适用。
不过可以通过重载filterAcceptsRow() 和filterAcceptsColumn()函数来实现,父节点不匹配的话,也会搜索子节点。
-
2018-07-16 12:26
-
FileDialog {
阅读全文»分类:默认分类|回复:0|浏览:1160
id: fileDialog
title: "Please choose a file"
folder: "file:///" + "E:/Qml/"; //设置默认打开文件夹路径,前面需要加上"file:///"
onAccepted: {
console.log("You chose: " + fileDialog.fileUrls)
Qt.quit()
}
onRejected: {
console.log("Canceled")
Qt.quit()
}
Component.onCompleted: visible = true
}