Развертывание на win10
Добрый день.
При сборке на винде qml отображается, при развертывании приложения на win 10 qml не отображается.
Кто-нибудь сталкивался?
код:
QT += core gui quick widgets quickwidgets CONFIG += c++11 # You can make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ main.cpp RESOURCES += \ src.qrc TRANSLATIONS += \ helloWorld_ru_RU.ts # Additional import path used to resolve QML modules in Qt Creator's code model QML_IMPORT_PATH = # Additional import path used to resolve QML modules just for Qt Quick Designer QML_DESIGNER_IMPORT_PATH = # Default rules for deployment. qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target
#include <QApplication> #include <QDebug> #include <QQuickWidget> #include <QMainWindow> class MyQQuickWidget : public QQuickWidget { }; int main(int argc, char **argv) { QApplication app(argc, argv); // const QSize size(400, 400); QMainWindow m; QQuickWidget *w = new QQuickWidget(&m); m.setCentralWidget(w); w->resize( m.width(), m.height() ); w->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); w->setResizeMode(QQuickWidget::SizeRootObjectToView); w->setSource( QUrl("qrc:/main.qml") ); m.showMaximized(); return app.exec(); } // main
Rectangle{ anchors.fill: parent color: "black" }
Содержание дирректории при развертывании на win10:
d3dcompiler_47.dll
first.exe
libEGL.dll
libgcc_s_seh-1.dll
libGLESv2.dll
libstdc++-6.dll
libwinpthread-1.dll
platforms
Qt5Core.dll
Qt5Gui.dll
Qt5Network.dll
Qt5Qml.dll
Qt5QmlModels.dll
Qt5Quick.dll
Qt5QuickWidgets.dll
Qt5Widgets.dll
We recommend hosting TIMEWEB
Stable hosting, on which the social network EVILEG is located. For projects on Django we recommend VDS hosting.Do you like it? Share on social networks!
- Дмитрий
- May 7, 2024, 9:40 a.m.
C ++ - Test 004. Pointers, Arrays and Loops
- Result:60points,
- Rating points-1
d
- dsfs
- April 26, 2024, 4:56 a.m.
C ++ - Test 004. Pointers, Arrays and Loops
- Result:80points,
- Rating points4
Last comments
Qt Linux - Lesson 001. Autorun Qt application under Linux как сделать автозапуск для флэтпака, который не даёт создавать файлы в ~/.config - вот это вопрос ))
АК
Qt WinAPI - Lesson 007. Working with ICMP Ping in Qt Без строки #include <QRegularExpressionValidator> в заголовочном файле не работает валидатор.
Анатолий КононенкоFeb. 5, 2024, 1:50 a.m.
EVADec. 25, 2023, 10:30 a.m.
Boost - static linking in CMake project under Windows Сделал всё по-как у вас, но выдаёт ошибку [build] LINK : fatal error LNK1104: не удается открыть файл "libboost_locale-vc142-mt-gd-x64-1_74.lib" Хоть убей, не могу понять в чём дел…
Qt/C++ - Lesson 056. Connecting the Boost library in Qt for MinGW and MSVC compilers Для решения твой проблемы добавь в файл .pro строчку "LIBS += -lws2_32" она решит проблему , лично мне помогло.
Now discuss on the forum
добавить qlineseries в функции в функции: "GPlotter::addSeries(QString title, QVector &arr)" я вызываю метод setChart(...), я в конструктор передал адрес на QChartView элемент
BlinCTMay 5, 2024, 5:46 a.m.
Best Indian Food Restaurant In Cincinnati OH Ready to embark on a gastronomic journey like no other? Join us at App india restaurant and discover why we're renowned as the Best Indian Food Restaurant In Cincinnati OH . Whether y…
Evgenii LegotckoiMay 2, 2024, 2:07 p.m.
IscanderCheApril 30, 2024, 4:22 a.m.
Вы собрали не полный дистрибутив и не положиле зависимости qml.
cqtdeployer -bin My.exe -qmake /path/to/my/qmake.exe -qmlDir /path/to/my/qml/source/Dir
Какая структура у вашей дирректори?
Собранного cqtdeployer под винду нет.
Гит репу хз как собирать, в документации указаны только флаги.
Процесс сборки не показан.
https://github.com/QuasarApp/CQtDeployer/releases/download/1.5.1/CQtDeployer_1.5.1_Installer_Win64.exe
спасибо
запускаю в дирректори с кодом
cqtdeployer -bin my.exe -qmake C:/Qt/5.15.2/mingw81_64/bin/qmake.exe -qmlDir ./
требует некий конфиг
Покажите ваш лог
Снимок_экрана_2021-05-27_17-00-50.png
в место my.exe должен быть путь к исполяемому файлу вашей программы. Программа должна быть собрана под релиз а не дебаг.
спасибо) заработало
cqtdeployer -bin C:/first/src/build-helloWorld-Desktop_Qt_5_15_2_MinGW_64_bit-Release/release/helloWorld.exe -qmake C:/Qt/5.15.2/mingw81_64/bin/qmake.exe -qmlDir ../first