Skip to content
  • 0 Votes
    2 Posts
    144 Views
    MarkkyboyM

    A total guess; Screen QML contains 'orientation' and 'primaryOrientation'.

    https://doc.qt.io/qt-5/qml-qtquick-window-screen.html#orientation-attached-prop

    I'm using Qt5.15, so can't offer any real insight. I assume the monitor you are using is able to /does contain an accelerometer and should be able to rotate either dynamically or by code.

  • 0 Votes
    3 Posts
    116 Views
    F

    @jsulm said in Compiling qtgraphicaleffects separately yields errors.:

    Is the source code you're building same version as your Qt?
    Please post errors as text.

    Think you for your reply.

    Is the source code you're building same version as your Qt?

    My qmake info:

    QMake version 3.1
    Using Qt version 5.12.5 in /home/lohand/t507/arm_qt5/lib

    Please post errors as text.

    I'm sorry about that. Here is the complete compiled output:

    lohand@t507:~/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtgraphicaleffects$ make -j8 cd src/ && ( test -e Makefile || /home/lohand/t507/OKT507-linux-sdk/out/t507/okt507/longan/buildroot/host/bin/qmake -o Makefile /home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtgraphicaleffects/src/src.pro ) && make -f Makefile make[1]: Entering directory '/home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtgraphicaleffects/src' cd effects/ && ( test -e Makefile || /home/lohand/t507/OKT507-linux-sdk/out/t507/okt507/longan/buildroot/host/bin/qmake -o Makefile /home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtgraphicaleffects/src/effects/effects.pro ) && make -f Makefile make[2]: Entering directory '/home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtgraphicaleffects/src/effects' ( test -e Makefile.effects_plugin || /home/lohand/t507/OKT507-linux-sdk/out/t507/okt507/longan/buildroot/host/bin/qmake -o Makefile.effects_plugin /home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtgraphicaleffects/src/effects/effects_plugin.pro ) && make -f Makefile.effects_plugin cd private/ && ( test -e Makefile || /home/lohand/t507/OKT507-linux-sdk/out/t507/okt507/longan/buildroot/host/bin/qmake -o Makefile /home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtgraphicaleffects/src/effects/private/private.pro ) && make -f Makefile make[3]: Entering directory '/home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtgraphicaleffects/src/effects' rm -f libqtgraphicaleffectsplugin.so /home/lohand/t507/OKT507-linux-sdk/out/t507/okt507/longan/buildroot/host/bin/aarch64-linux-gnu-g++ --sysroot=/home/lohand/t507/OKT507-linux-sdk/out/t507/okt507/longan/buildroot/host/aarch64-buildroot-linux-gnu/sysroot -Wl,-O1 -fuse-ld=gold -Wl,--enable-new-dtags -shared -o libqtgraphicaleffectsplugin.so .obj/plugin.o .obj/qrc_qtgraphicaleffectsshaders.o -latomic /home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtdeclarative/lib/libQt5Quick.so /home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtbase/lib/libQt5Gui.so /home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtdeclarative/lib/libQt5Qml.so /home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtbase/lib/libQt5Network.so /home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtbase/lib/libQt5Core.so -lGL -lpthread -lrt -lpthread -ldl make[3]: Entering directory '/home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtgraphicaleffects/src/effects/private' /home/lohand/t507/OKT507-linux-sdk/out/t507/okt507/longan/buildroot/host/bin/aarch64-linux-gnu-g++ -c -pipe -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -DEGL_FBDEV -std=c++11 --sysroot=/home/lohand/t507/OKT507-linux-sdk/out/t507/okt507/longan/buildroot/host/aarch64-buildroot-linux-gnu/sysroot -O2 -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -D_REENTRANT -fPIC -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I/home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtdeclarative/include/QtQuick/5.12.5 -I/home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtdeclarative/include/QtQuick/5.12.5/QtQuick -I/home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtdeclarative/include -I/home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtdeclarative/include/QtQuick -I/home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtbase/include/QtGui/5.12.5 -I/home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtbase/include/QtGui/5.12.5/QtGui -I/home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtbase/include -I/home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtbase/include/QtGui -I/home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtdeclarative/include/QtQml/5.12.5 -I/home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtdeclarative/include/QtQml/5.12.5/QtQml -I/home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtdeclarative/include/QtQml -I/home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtbase/include/QtNetwork -I/home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtbase/include/QtCore/5.12.5 -I/home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtbase/include/QtCore/5.12.5/QtCore -I/home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtbase/include/QtCore -I.moc -I/home/lohand/t507/OKT507-linux-sdk/out/t507/okt507/longan/buildroot/host/mkspecs/devices/linux-buildroot-g++ -o .obj/qgfxshaderbuilder.o qgfxshaderbuilder.cpp /home/lohand/t507/OKT507-linux-sdk/out/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/7.4.1/../../../../aarch64-linux-gnu/bin/ld.gold: error: cannot find -lGL collect2: error: ld returned 1 exit status Makefile.effects_plugin:70: recipe for target '../../qml/QtGraphicalEffects/libqtgraphicaleffectsplugin.so' failed make[3]: *** [../../qml/QtGraphicalEffects/libqtgraphicaleffectsplugin.so] Error 1 make[3]: Leaving directory '/home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtgraphicaleffects/src/effects' Makefile:45: recipe for target 'sub-effects_plugin-pro-make_first' failed make[2]: *** [sub-effects_plugin-pro-make_first] Error 2 make[2]: *** Waiting for unfinished jobs.... qgfxshaderbuilder.cpp: In constructor ‘QGfxShaderBuilder::QGfxShaderBuilder()’: qgfxshaderbuilder.cpp:68:20: error: aggregate ‘QOpenGLContext context’ has incomplete type and cannot be defined QOpenGLContext context; ^~~~~~~ qgfxshaderbuilder.cpp:81:50: error: incomplete type ‘QOpenGLContext’ used in nested name specifier QOpenGLContext *oldContext = QOpenGLContext::currentContext(); ^~~~~~~~~~~~~~ qgfxshaderbuilder.cpp:82:51: error: invalid use of incomplete type ‘class QOpenGLContext’ QSurface *oldSurface = oldContext ? oldContext->surface() : 0; ^~ In file included from /home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtbase/include/QtGui/qsurfaceformat.h:1:0, from /home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtbase/include/QtGui/../../src/gui/kernel/qsurface.h:45, from /home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtbase/include/QtGui/qsurface.h:1, from /home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtbase/include/QtGui/../../src/gui/kernel/qoffscreensurface.h:45, from /home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtbase/include/QtGui/qoffscreensurface.h:1, from /home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtbase/include/QtGui/QOffscreenSurface:1, from qgfxshaderbuilder.cpp:43: /home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtbase/include/QtGui/../../src/gui/kernel/qsurfaceformat.h:49:7: note: forward declaration of ‘class QOpenGLContext’ class QOpenGLContext; ^~~~~~~~~~~~~~ qgfxshaderbuilder.cpp:84:9: error: ‘QOpenGLFunctions’ was not declared in this scope QOpenGLFunctions *gl = context.functions(); ^~~~~~~~~~~~~~~~ qgfxshaderbuilder.cpp:84:9: note: suggested alternative: ‘QOpenGLContext’ QOpenGLFunctions *gl = context.functions(); ^~~~~~~~~~~~~~~~ QOpenGLContext qgfxshaderbuilder.cpp:84:27: error: ‘gl’ was not declared in this scope QOpenGLFunctions *gl = context.functions(); ^~ qgfxshaderbuilder.cpp:98:23: error: invalid use of incomplete type ‘class QOpenGLContext’ oldContext->makeCurrent(oldSurface); ^~ In file included from /home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtbase/include/QtGui/qsurfaceformat.h:1:0, from /home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtbase/include/QtGui/../../src/gui/kernel/qsurface.h:45, from /home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtbase/include/QtGui/qsurface.h:1, from /home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtbase/include/QtGui/../../src/gui/kernel/qoffscreensurface.h:45, from /home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtbase/include/QtGui/qoffscreensurface.h:1, from /home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtbase/include/QtGui/QOffscreenSurface:1, from qgfxshaderbuilder.cpp:43: /home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtbase/include/QtGui/../../src/gui/kernel/qsurfaceformat.h:49:7: note: forward declaration of ‘class QOpenGLContext’ class QOpenGLContext; ^~~~~~~~~~~~~~ Makefile:2159: recipe for target '.obj/qgfxshaderbuilder.o' failed make[3]: *** [.obj/qgfxshaderbuilder.o] Error 1 make[3]: Leaving directory '/home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtgraphicaleffects/src/effects/private' Makefile:64: recipe for target 'sub-private-make_first' failed make[2]: *** [sub-private-make_first] Error 2 make[2]: Leaving directory '/home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtgraphicaleffects/src/effects' Makefile:46: recipe for target 'sub-effects-make_first' failed make[1]: *** [sub-effects-make_first] Error 2 make[1]: Leaving directory '/home/lohand/t507/qt/qt_creator_5.12.5/5.12.5/Src/qtgraphicaleffects/src' Makefile:47: recipe for target 'sub-src-make_first' failed make: *** [sub-src-make_first] Error 2
  • Load SVG image with parameters

    Unsolved QML and Qt Quick
    1
    0 Votes
    1 Posts
    609 Views
    No one has replied
  • 0 Votes
    2 Posts
    559 Views
    B

    If I understood correctly, you want to draw a red line.
    The purpose of Path is to position elements through a path. Think of a row or a column that's not straight. You can understand better if you run the first example from this tutorial.

    To draw paths you need Shape.

    import QtQuick 2.15 import QtQuick.Window 2.15 import QtQuick.Shapes 1.12 Window { width: 640 height: 480 visible: true title: qsTr("Редактор персонажей") Shape { ShapePath { strokeColor: "red"; // it works :) startX: 0; startY: 100 PathLine { x: 640; y: 480 } } } }
  • 0 Votes
    2 Posts
    317 Views
    jsulmJ

    @timob256 I entered "Qt Quick draw line" in Google and got this: https://doc.qt.io/qt-5/qml-qtquick-pathline.html

  • 0 Votes
    2 Posts
    468 Views
    M

    Problem solved by calling chekbox.forceActiveFocus(Qt.TabFocusReason)

  • 0 Votes
    1 Posts
    373 Views
    No one has replied
  • 0 Votes
    28 Posts
    6k Views
    KroMignonK

    @Phips04 Your welcome

  • 0 Votes
    5 Posts
    1k Views
    J

    I found out that between two cases (working and not working one) only file that differs substantially is qmlcache_loader.cpp. In non-working case it was over 5 times smaller than normally, and that's because 80% of all resources were not there.

    Now, the only reason why it's happened is because some qrc files has been added to RESOURCES twice, and only those resources were available at the end.
    Why it worked after moving file from one qrc file to another? Probably because only those part of the project which depends on that two files has been updated and though every qrc file has been included only once (duplicates was in my case in the other part of the project).

    EDIT:
    Before marking it as solved I will try to confirm all of the above hypothesis.

  • 0 Votes
    3 Posts
    1k Views
    M

    It does look like a similar issue. I was able to find a workaround thanks to this bug report. Setting the target OSX version to 10.12 in CMake did the trick.

  • 0 Votes
    1 Posts
    580 Views
    No one has replied
  • 0 Votes
    13 Posts
    4k Views
    D

    @GrecKo oh thank you very much. I confused bottomMargin for anchors.bottomMargin. I wasn't aware of this property being available. This is exactly what I needed!

  • 1 Votes
    2 Posts
    3k Views
    jiancaiyangJ

    @Angelking 恰好我也在做这方面的研究。
    我的需求是,为我们的动作编辑器增添Direct3D的支持,因为用户更加习惯MME----这是一个基于HLSL的渲染框架。
    这里问题在于我们使用的是Qt Quick,而现有的代码是和OpenGL深度绑定的,我们需要做的是考察哪些地方和OpenGL深度绑定的,然后尝试抽象出来,做好做成一个插件,我是考察Qt插件的写法决定将OpenGL相关的内容放在插件里实现。

    想让Qt Quick应用和OpenGL和Direct3D解耦,我想一个方法就是使用RTT技术。就是采用不同的渲染器在一个纹理图上渲染,这样有可能通用。但是其中的难点感觉还是挺多的,现在在艰难地攻克。

  • 0 Votes
    11 Posts
    4k Views
    L

    After some tinkering, I've gotten the designer plugin to work the way I originally wanted. I simply commented out the 'module' directive in the 'qmldir' file:

    # module MyLib typeinfo plugin.qmltypes plugin MyLib ../ designersupported

    and added some qmake targets to automatically run 'qmlplugindump' post-build.

    So now my plugin directory structure looks like this:

    /imports |---MyLib.dll (or libMyLib.so) |---/MyLib |---|---qmldir |---|---plugin.qmltypes

    Now I can get the plugin to run in 'qmlscene':

    qmlscene -I <imports directory> <main qml file>

    There are only two caveats in this case. First, QML files that are to import anything from the library must first import 'MyLib 1.0' before importing anything else ('MyLib.Rectangle', 'MyLib.Circle', etc.). This is so that the plugin is loaded initially to populate the other imports. Secondly, this will produce the following message when the plugin is loaded:

    Module 'MyLib' does not contain a module identifier directive - it cannot be protected from external registrations.

    However in my case, this is not an issue and can be safely overlooked.

  • 0 Votes
    5 Posts
    3k Views
    GrecKoG

    @dv__ said in QML animations with dynamic content:

    Also, just out of curiosity, in a more generic case (say, some arbitrary, non-grid arrangement), would my approach make sense? I suppose I could still use ListModel in this case, but the arrangement would have to be done manually, not with an existing view.

    To do this I'd use a raw Item container with a Repeater and manual positioning in the delegates.

  • 0 Votes
    4 Posts
    2k Views
    Z

    @GrecKo thanks for your comment. I've managed to create the window in which people would touch the video, but I'm not sure how to make the player. I've seen there is a library, Qt media, but I don't really know how to bind it with the other screen.

  • 2 Votes
    1 Posts
    1k Views
    No one has replied
  • 0 Votes
    4 Posts
    3k Views
    T

    You have to enable Use QML emulation layer that is built with the selected Qt in the settings, since Qt Creator does ship with Canvas3D.
    Note that Canvas3D is not officially supported in the designer, though.

  • 0 Votes
    7 Posts
    9k Views
    Julien BJ

    Thanks @jpnurmi,

    This is exactly what i was looking for, all my issues are solved.