gpt4 book ai didi

c++ - QFileDialog 在重启后只工作一次(否则打印错误)

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:50:57 27 4
gpt4 key购买 nike

问题

我使用 QFileDialog。它运行良好,突然我的问题出现了。

重新启动后,下面给出的代码按预期工作。然后,如果我关闭应用程序并重新启动它,模式窗口需要很长时间才能出现并且从不显示文件夹。

一段时间后(5-10 秒)出现一个弹出窗口,内容如下:“[错误] 处理文件协议(protocol)的进程意外停止”(我的是用法语写的)

有人遇到过吗?

编辑:错误前的最后一行调试

当它工作时(重启后)我启动应用程序,当我退出它时,调试读取

Cancelled FAM (Req 2) for "/media/Donnees/Videos_tmp"
Cancelled FAM (Req 1) for "/media/Donnees"

我认为问题出在这两行。

系统

ArchLinux 3.16.1

代码示例:

int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MainWindow l_mainWindow;
l_mainWindow.show();
QString l_folder = QFileDialog::getOpenFileName();
qDebug() << l_folder;
return app.exec();
}

控制台信息

QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: Aucun fichier ou dossier de ce type
QObject::connect: No such signal org::freedesktop::UPower::DeviceAdded(QString)
QObject::connect: No such signal org::freedesktop::UPower::DeviceRemoved(QString)
"L'URL ne peut être listée
trash:/"
"L'URL ne peut être listée
trash:/"
Added Dir "/media/Donnees/Documents/Projets/" for "" ["KDirWatch-1"]
Setup FAM (Req 1) for "/media/Donnees/Documents/Projets/"
Added Dir "/media/Donnees/Documents/Projets/subfold" for "" ["KDirWatch-1"]
Setup FAM (Req 2) for "/media/Donnees/Documents/Projets/subfold"
Cancelled FAM (Req 1) for "/media/Donnees/Documents/Projets/"
QFileInfo::absolutePath: Constructed with empty filename
QFileInfo::absolutePath: Constructed with empty filename
QFileInfo::absolutePath: Constructed with empty filename
QFileInfo::absolutePath: Constructed with empty filename
QFileInfo::absolutePath: Constructed with empty filename
QFileInfo::absolutePath: Constructed with empty filename
QFileInfo::absolutePath: Constructed with empty filename
QFileInfo::absolutePath: Constructed with empty filename
QFileInfo::absolutePath: Constructed with empty filename
Trying to open ksycoca from "/home/olivier/.cache/ksycoca5"
KServiceTypeTrader: serviceType "KNotify/NotifyMethod" not found
Got configs "knotifications5/plasma_workspace.notifyrc" "plasma_workspace.notifyrc"
Got groups ()
Got notification " "messageCritical" " with actions: ""
QFileInfo::absolutePath: Constructed with empty filename
QFileInfo::absolutePath: Constructed with empty filename
QFileInfo::absolutePath: Constructed with empty filename
QFileInfo::absolutePath: Constructed with empty filename
QFileInfo::absolutePath: Constructed with empty filename
QFileInfo::absolutePath: Constructed with empty filename

最佳答案

好吧,就是这样......

我的 kf5 (=kde5) 和 kde4 有冲突。由于我删除了kf5框架,错误消失了。

谢谢大家抽出时间

关于c++ - QFileDialog 在重启后只工作一次(否则打印错误),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25720988/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com