gpt4 book ai didi

Can't run Marble QML examples(无法运行大理石QML示例)

转载 作者:bug小助手 更新时间:2023-10-25 21:13:05 48 4
gpt4 key购买 nike



I am trying to work with KDE Marble and I see this document.

我正在尝试使用KDE Marble,我看到了这个文档。


import QtQuick 2.1
import org.kde.marble 0.20

MarbleWidget {
projection: "Mercator"
mapThemeId: "earth/openstreetmap/openstreetmap.dgml"
}


QML debugging is enabled. Only use this in a safe environment.


qt.qpa.qgnomeplatform.theme: The desktop style for QtQuick Controls 2
applications is not available on the system (qqc2-desktop-style).


The application may look broken. QQmlApplicationEngine failed to load
component qrc:/main.qml:4:1: module "org.kde.marble" is not installed



I also can't run and test examples/qml/.

我也不能运行和测试示例/QML/。


I use:

我使用:



  • Fedora 38

  • Qt 5.15.10


I could build and install Marble, and its widgets work correctly, but I can't try its QML example.

我可以构建并安装Marble,它的小部件可以正常工作,但我不能尝试它的QML示例。


更多回答

Are you linking your app with the marble libraries? From the examples, it looks like you may need to link with marbledeclarative.

你正在将你的应用程序与大理石图书馆联系起来吗?从这些例子中,看起来你可能需要链接到marbledecculative。

@JarMan thanks for your comment, I didn't understand, could you show me in one example? I can run widget examples but I can't run QML.

@Jarman谢谢你的评论,我不明白,你能举一个例子给我看看吗?我可以运行小部件示例,但不能运行QML。

In your CMakeFiles.txt, do you have something like this: target_link_libraries(${TARGET} marblewidget marbledeclarative)

在你的CMakeFiles.txt中,你有这样的东西吗:TARGET_LINK_LIBRARY(${Target}marblewidget marbledclarative)

@JarMan I test it , but adding marbledeclarative didnt fix it , I try in both qmake and cmake.I still get qrc:/main.qml:4:1: module "org.kde.marble" is not installed.

@Jarman我测试了它,但添加marbledecarative并没有修复它,我在qmake和cmake中都尝试了。我仍然得到qrc:/main.qml:4:1:模块“org.kde.marble”没有安装。

@JarMan I think this might be relate to installation of marble from this doc they said cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_KF5=TRUE -DCMAKE_INSTALL_PREFIX=/usr/local ~/marble/sources but as I check there is no MarbleQuickItem.h file how should we install it correctly to enable qml too?

@Jarman我认为这可能与本文档中大理石的安装有关他们说cmake-DCMAKE_BUILD_TYPE=Debug-DWITH_KF5=TRUE-DCMAKE_INSTALL_PREFIX=/usr/local~/marble/Sources但我检查没有MarbleQuickItem.h文件,我们应该如何正确安装才能启用QML?

优秀答案推荐
更多回答

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