小编Ale*_*Ale的帖子

Ubuntu QT安装qt快速控件2.1

我有一个 Qt 5.7.0 应用程序。当我运行我的应用程序时,它没有启动,并且有一条终端消息说:

QQmlApplicationEngine failed to load component
qrc:/main.qml:2 module "QtQuick.Controls" version 2.1 is not installed
Run Code Online (Sandbox Code Playgroud)

我该如何解决这个问题?

谢谢!!

linux terminal ubuntu qt qml

5
推荐指数
1
解决办法
1万
查看次数

Qt cpp - 将 QString 写入文本文件的干净方法

我需要找到一个干净,快捷的方式写QString.csv文件中。我试过:

QString path= QCoreApplication::applicationDirPath() + QString("/myfile.csv");
QFile file(path);
QString mystring = "Hello, world!";    
if(!file.open(QIODevice::WriteOnly)){
        file.close();
    } else {
        QTextStream out(&file); out << mystring;
        file.close();
    }
Run Code Online (Sandbox Code Playgroud)

但它经常为我"???????"myfile.csv

c++ qstring qt iostream

4
推荐指数
1
解决办法
1万
查看次数

标签 统计

qt ×2

c++ ×1

iostream ×1

linux ×1

qml ×1

qstring ×1

terminal ×1

ubuntu ×1