Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.4k Posts
  • Hide Cursor

    2
    0 Votes
    2 Posts
    1k Views
    A
    When running the application on main.cpp: QGuiApplication app(argc, argv); QApplication::setOverrideCursor(QCursor(Qt::BlankCursor));
  • QT5.3.2 quick camera

    1
    0 Votes
    1 Posts
    531 Views
    No one has replied
  • Border change in TextArea

    3
    0 Votes
    3 Posts
    3k Views
    T
    TextAreaStyle has no atкribute "border"(
  • Menu/ComboBox draw issues

    1
    0 Votes
    1 Posts
    467 Views
    No one has replied
  • [SOLVED] Problem with iOS app and QML Plugin.

    4
    1 Votes
    4 Posts
    96k Views
    shavS
    Hi everyone! At last I found the solution of my problem with static plugin for iOS. The solution is: set line to your plugin .pro file @ QMAKE_MOC_OPTIONS += -Muri=com.shav.picfection @ and you plugin .pro file must looks like: TEMPLATE = lib TARGET = PicfectionSDK QT += qml quick network ios { CONFIG += qt plugin c++11 static } else { CONFIG += qt plugin c++11 } TARGET = $qtLibraryTarget($TARGET) uri = com.shav.picfection QMAKE_MOC_OPTIONS += -Muri=com.shav.picfection #<----- This helped me to solve my problem. DESTDIR = com/shav/picfection OBJECTS_DIR = tmp/objects MOC_DIR = tmp/mocs SOURCES += picfectionsdk_plugin.cpp picfectionmanager.cpp Requests/picfectionnetworkmanager.cpp Requests/picfectionrequest.cpp Objects/Team/picfectionteam.cpp Objects/Project/picfectionproject.cpp Objects/Event/picfectionevent.cpp Objects/Event/picfectioneventdatas.cpp Objects/Event/picfectioneventdocument.cpp Objects/Event/picfectioneventuser.cpp HEADERS += picfectionsdk_plugin.h picfectionmanager.h Requests/picfectionnetworkmanager.h Requests/picfectionrequest.h Objects/Team/picfectionteam.h Objects/Project/picfectionproject.h Objects/Event/picfectionevent.h Objects/Event/picfectioneventdatas.h Objects/Event/picfectioneventdocument.h Objects/Event/picfectioneventuser.h DISTFILES = qmldir picfectionsdk.json !equals(PRO_FILE_PWD, $OUT_PWD) { copy_qmldir.target = $OUT_PWD/$DESTDIR/qmldir copy_qmldir.depends = $PRO_FILE_PWD/qmldir copy_qmldir.commands = $(COPY_FILE) "$replace(copy_qmldir.depends, /, $QMAKE_DIR_SEP)" "$replace(copy_qmldir.target, /, $QMAKE_DIR_SEP)" sourceQmlTypePath = $_PRO_FILE_PWD_/Picfection.qmltypes targetQmlTypePath = $OUT_PWD/$DESTDIR/Picfection.qmltypes copy_qmldir.commands += && $(COPY_FILE) \"$replace(sourceQmlTypePath, /, $QMAKE_DIR_SEP)\" \"$replace(targetQmlTypePath, /, $QMAKE_DIR_SEP)\" sourceQmlFilesPath = $PRO_FILE_PWD/MslQmlControllerItem.qml targetQmlFilesPath = $OUT_PWD/$DESTDIR/MslQmlControllerItem.qml copy_qmldir.commands += && $(COPY_FILE) "$replace(sourceQmlFilesPath, /, $QMAKE_DIR_SEP)" "$replace(targetQmlFilesPath, /, $QMAKE_DIR_SEP)" QMAKE_EXTRA_TARGETS += copy_qmldir PRE_TARGETDEPS += $copy_qmldir.target } qmldir.files = qmldir unix { installPath = $[QT_INSTALL_QML]/$replace(uri, \., /) qmldir.path = $installPath target.path = $installPath INSTALLS += target qmldir }
  • How to pass QString array from .cpp to string array in qml

    2
    0 Votes
    2 Posts
    2k Views
    O
    Hello and welcome, basically you can pass a C++ Object to Qt using the setContextProperty method. For further informations i would recommend you to check our this qt doc: http://doc.qt.io/qt-5/qtqml-cppintegration-contextproperties.html It should answer your question and explain it better than i could =) If you have got more questions you are free to ask here! Greetings
  • 0 Votes
    1 Posts
    592 Views
    No one has replied
  • ListView with TextInput delegate is very slow

    3
    0 Votes
    3 Posts
    850 Views
    J
    I don't know the cause of the slowdown, but as a tip I would suggest you simply use a Text item for the delegate, and add a Loader which only creates a and replaces it with a TextInput when the delegate is pressed.
  • (solved) animating a dynamically created qml component

    5
    0 Votes
    5 Posts
    1k Views
    p3c0P
    You're Welcome :) Please mark the post as solved.
  • Video element plays video at wrong position on IOS

    29
    0 Votes
    29 Posts
    8k Views
    M
    I too have this problem. My UI code is all QML and is super simple. I have a video component Video { id: myVideo anchors.fill: parent anchors.margins: 10 source: mediaFolder.fileUrl(filesList[mediaIndex]) } and a button. Rectangle { id: start anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter anchors.margins: 20 width: parent.height * 0.85 height: parent.height * 0.85 color: "blue" MouseArea { anchors.fill : parent onPressed: { mediaIndex++; myVideo.play(); } } When you click the button it plays the next video in the mediaFolder. This works as expected on Windows and Android. On iOS i have the random positioning problem described in this forum, which can somewhat be worked around by rotating the device (not nice). What is my bigger problem is settling on a video encoding that works everywhere. These same videos do not play on Mac (either in my QML app or directly from Finder) or Linux (not in my QML app but DO when I launch directly from the file manager. So for now i cant say if the positioning problem is unique to iOS, it could be on Mac and Linux too - i just cant see my video there yet. I had settled on using Handbrakes ipod profile as the most cross platform but alas its back to the drawing board for video format. Has anyone else nailed the absolute cross platform video format?
  • Map showing white screen first time it is opened.

    2
    0 Votes
    2 Posts
    637 Views
    A
    Anyone with an idea??? I got rid of the problem and now I have it again..
  • C++ class wouldn't build in bare bone QML application

    5
    0 Votes
    5 Posts
    1k Views
    dheerendraD
    It generates the makes files again to compile your sources. You have added new class files to your project. So pro file got updated. I have seen some times it does not generate make file on its own after adding new class files. I have seen this more with when I'm using the qmake/qt creator with VC++. In general it is good practice to re-run the qmake once the pro-file is updated.
  • [SOLVED] How to fix screen orientation to landscape in Quick 2 ?

    8
    0 Votes
    8 Posts
    9k Views
    M
    Mybe i did something wrong, but after i created a template (i'm using qt 3.3) i am not able to build anymore, any idea? :)
  • [Solved] Cannot resolve local file url

    5
    0 Votes
    5 Posts
    4k Views
    P
    Dumb. Dumb. Dumb. I found a typo in my hard-coded path. It works fine when I actually look at my code.
  • Qt 5 - qmlRegisterType gives "module is not installed".

    6
    0 Votes
    6 Posts
    7k Views
    A
    Had the same problem when starting a new project. For me the problem was with mixing QDeclarativeComponent with QtQuick 2.3. Replacing QDeclarativeComponent by QQuickItem did the trick. Note: make sure that any includes @#include <QDeclarativeComponent>@ in your code are replaced by @#include <QQuickItem>@ Especially in main.cpp. Including both of these gives compile errors on qmlRegisterType as long as QDeclarativeComponent is included so these two headers should not be mixed. Hope this helps anywone with this problem.
  • Long time C++ Qt user tries out QML

    3
    0 Votes
    3 Posts
    1k Views
    J
    Thanks a lot for the detailed answer! So the canvas API is the only way to paint from QML/JavaScript? For all the other options you still have to relay on C++. What about a delarative way to specify vector graphics? I could only find QML Rectagle and wonder if I could recursivley declare them somehow that the will form a Koch Curve :D However I am a bit disappointed by the fact that you can create binding loops by doing something simple as possible. I mean I thought QML is as an easy to use solution for fronteds, like HTML but with a cleaner syntax and IIRC you cannot create binding loops in HTML.
  • Qt Quick Button' hovered is true event if it's disabled

    15
    0 Votes
    15 Posts
    7k Views
    T
    Well, I will reproduce the problem for clearer description on bug tracker. Anyways, thank you very much for your help!
  • QtMultimedia 5.0 not installed.

    4
    0 Votes
    4 Posts
    3k Views
    JKSHJ
    Hi, [quote author="houmingc" date="1418657763"]i know my problem lies not on my qt creator because i can create video via a new qml. it lies on this old legacy code, i believe.[/quote] What version of Qt (Qt version + compiler version) did you use to create the new QML project? What version of Qt (Qt version + compiler version) did you use to create your legacy code? Did "import QtMultimedia" ever work in your legacy code?
  • [Solved] Q_RETURN_ARG for QObject-derived type

    9
    1 Votes
    9 Posts
    4k Views
    SGaistS
    Ok, strange...
  • XmlListModel causes malloc fail !

    7
    0 Votes
    7 Posts
    2k Views
    S
    No problem, Thank you for your help, I also wish a merry christmas and happy new year to you, and those who will read this thread ;-)