Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k Topics 77.6k Posts
  • Throwing a script exception from C++ (QtQuick 2.0)

    1
    0 Votes
    1 Posts
    956 Views
    No one has replied
  • Problem with adding custom qml module

    3
    0 Votes
    3 Posts
    2k Views
    S
    I made my own qml module earlier today. What I did was to set the environment variable QML2_IMPORT_PATH to the absolute search path to my module folder. It's important that you set a global environment variable. This because when running your qml from Qt Creator you don't seem to run it as your user. I'm on a mac so I set it in the /etc/launchd.conf file as such setenv QML2_IMPORT_PATH /path/to/your/module
  • [Solved] Strange behavior of Qml ListView

    5
    0 Votes
    5 Posts
    3k Views
    D
    [quote author="Jens" date="1361264701"]My guess is that your View is completed before the model has fetched any data. The XMLListModel is asynchronous so when you position the view at row 15, there might not be any rows to position at yet. You might instead want to move the positionViewAtIndex to: XmlListModel { onStatusChanged: if (status == XmlListModel.Ready ) ... }[/quote] Thank you very much, that was the problem ( I didn't know.XmlListModel is asynchronous). So everything works when I call: @onStatusChanged: if(status==XmlListModel.Ready) { listView.positionViewAtIndex(15, ListView.Beginning) }@
  • How to debug transition in a QML applications

    3
    0 Votes
    3 Posts
    2k Views
    T
    I got it. Thank you very much!
  • Get the original string source in a QML file from an url property

    11
    0 Votes
    11 Posts
    7k Views
    F
    Hi, we fixed this issue by querying the baseUrl of the context for the object with @QDeclarativeEngine::contextForObject()@ (which returns the qml file where the QObject resides) and then resolving the path to it relative from there. The disadvantage is, that you need to provide the pointer to the root element in your qml file to a C++ function, but that is a valid tradeoff. Maybe that helps someone. Thanks for your hints! Cheers, Chris
  • Qml variant to custom QtObject

    5
    0 Votes
    5 Posts
    2k Views
    A
    Thanks beemaster, Thomas Zander I have taken your advices and now my program works.
  • Where are Qml components?

    4
    0 Votes
    4 Posts
    1k Views
    M
    Yes, it helps. I was wondering where is that "standard" set of components. Thanks for clarification, Mateusz.
  • Large QML application performance:

    2
    0 Votes
    2 Posts
    2k Views
    sierdzioS
    Better use QtQuick 2 if possible, it will use OpenGL rendering instead of raster. Why are you using transform? Every Item has "scale" property already built-in. Using custom scaling might have an impact on performance, but I don't really know.
  • How to connect a property signal to a Javascript function.

    7
    0 Votes
    7 Posts
    6k Views
    C
    Note that the "valueChanged" function is a function property of "obj" and not of the "value" property of "obj". So, instead of: @ obj.value.valueChanged.connect(objEventHandler) @ you should use @ obj.valueChanged.connect(objEventHandler) @ Depending on the situation, using a declarative Connections element is better, though (for example, if the target of the dynamic connection can change depending on the situation). In some situations, on the other hand, using an imperative connection can be better (as you don't incur the overhead of constructing an extra QObject). Cheers, Chris.
  • Hardware accelerated realtime graph/chart

    2
    0 Votes
    2 Posts
    2k Views
    J
    You can alsouse the new Canvas item which essentially gives you QPainter functionality in javascript.
  • QAction shortcuts in QML

    4
    0 Votes
    4 Posts
    3k Views
    X
    It seems QAction is something specific for QtWidgets. A solution is to override @void keyPressEvent(QKeyEvent* event);@
  • Complex 2D graphics in QtQuick via C++

    6
    0 Votes
    6 Posts
    6k Views
    podsvirovP
    Creating a plug-in (aka module) allows you to easily re-use your components. The base class, use "QQuickPaintedItem":http://qt-project.org/doc/qt-5.0/qtquick/qquickpainteditem.html. Override the "QQuickPaintedItem::paint":http://qt-project.org/doc/qt-5.0/qtquick/qquickpainteditem.html#paint. You can draw text with the "painter->drawText":http://qt-project.org/doc/qt-5.0/qtgui/qpainter.html#drawText
  • QML and C++ Integration [solved]

    6
    0 Votes
    6 Posts
    2k Views
    R
    Thank you very much Thomas. That sure did the trick. You rock!
  • How to install module in Qt creator

    1
    0 Votes
    1 Posts
    764 Views
    No one has replied
  • QML Desktop Component for Qt 5

    5
    0 Votes
    5 Posts
    3k Views
    shavS
    [quote author="frederik" date="1360885598"]The dev branch requires Qt 5.1 (the dev branch of all Qt repos).[/quote] Thanks for the information. I will waiting the Qt 5.1 release, and I will use in my projects the stable branch of repository.
  • Problem setting visible property of a ListView to false

    2
    0 Votes
    2 Posts
    2k Views
    frederikF
    Visible should hide the list. If it is not the case it would be best to create a small self-contained example of this behavior and file an issue at https://bugreports.qt-project.org
  • QAbstractListModel in ListView, mouse area signals not working

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Sync 2 Views (PahtView/ListView) and one Model

    1
    0 Votes
    1 Posts
    744 Views
    No one has replied
  • Signal and slots

    9
    0 Votes
    9 Posts
    2k Views
    F
    I have solved this problem using function pointer. It is not the best solution but it works finally.
  • Delay of tooltip dissapearing in QML

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied