重启后QFileDialog只工作一次(否则会输出错误)

时间:2014-09-08 09:24:05

标签: c++ qt qfiledialog

问题

我使用的是QFileDialog。它工作得非常好,突然出现了我的问题。

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

过了一会儿(5-10秒)会出现一个弹出窗口,上面写着:" [错误]处理文件协议的过程意外停止" (我用法语写的)

有没有人经历过这个?

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

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

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

1 个答案:

答案 0 :(得分:0)

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

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

谢谢你们的时间