• 821阅读
  • 0回复

新建一个最简单的filedialog工程也提示Invalid parameter passed to C runtime function. [复制链接]

上一主题 下一主题
离线pjzmj2012
 

只看楼主 倒序阅读 楼主  发表于: 2022-06-28
RT.这可能是什么原因? 编译器的bug吗?
qt版本是5.14.2


import QtQuick 2.12
import QtQuick.Window 2.12
import QtQuick.Controls 2.2
import QtQuick.Dialogs 1.3

Window {
    visible: true
    width: 640
    height: 320
    title: "Fuck"

    FileDialog {
         id: openFileDialog
         title: "Open Files"
         nameFilters: ["Image Files(*.jpg)"]
         onAccepted: {
             // 此处可自定义文件处理功能
             console.log("You chose: " + openFileDialog.fileUrls)
             Qt.quit()
         }
     }

     Button {
         anchors.horizontalCenter: parent.horizontalCenter
         anchors.verticalCenter: parent.verticalCenter
         text: "open"
         onClicked: openFileDialog.open()
     }
}
这已经是所有的代码了 抱歉无法上传附件.
快速回复
限100 字节
 
上一个 下一个