Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.3k Posts
  • [WIP] C++/QML fully recursive TreeView

    5
    0 Votes
    5 Posts
    2k Views
    M
    Ohh, I see it now. I've added the missing files. I messed things up with .gitignore. Sorry about that, and thanks for spotting
  • 0 Votes
    3 Posts
    1k Views
    R
    bq. Connect with a BlockingQueuedConnection AFAIK you can not connect to a signal handler manually. Connection is generated by qml, qml creates signal handler and I don't know a way to change that.
  • Is there some kind of destroy/close event for QQuickItem?

    2
    0 Votes
    2 Posts
    1k Views
    A
    Handle the close event in the QQuickWindow or QQuickView. You have to reimplement event() in a subclass since there is no virtual closeEvent() function in QWindow. Then handle QEvent::Close, call the base class implementation for all other event types. In the Close event handler change the event's accepted flag to false so the window won't actually close. Then initate whatever you need doing. When it's done, exit the app (and make sure your close event handler recognizes this and accepts the event)
  • Qml - QtWebEngine, QtWebKit, QtWebView

    1
    1 Votes
    1 Posts
    2k Views
    No one has replied
  • Qt iOS: access to local .js file

    2
    0 Votes
    2 Posts
    886 Views
    SGaistS
    Hi, AFAIK, you are trying to do something forbidden on iOS i.e. modifying your app bundle. IIRC download code to run in your application is also something that's forbidden. You should rather use one of the official accessible folder that you can get through QStandardPaths::AppDataLocation but again, I'm not sure you'll be able to get your application through the AppStore with that download code part. Hope it helps
  • [SOLVED] Qt 5.4.0 does not compile statically with -opengl dynamic

    6
    0 Votes
    6 Posts
    2k Views
    H
    And it has been fixed \o/ https://codereview.qt-project.org/#/c/103908/ It was accepted after the 5.4.1 downmerge so it will be in 5.4.2
  • Scrollbar ? Like the "a-z" sidebar list in the Apple "Contacts" app

    3
    0 Votes
    3 Posts
    1k Views
    P
    Thx. Kind of expected that.
  • QML ListView does not reflect updates from its C++ data model [Solved]

    16
    0 Votes
    16 Posts
    7k Views
    K
    Okay, I did manage to get this to work finally. When clearing data, I used: @ beginResetModel(); m_data.clear(); endResetModel();@ When removing an individual item in the data, I used: @ beginRemoveRows(QModelIndex(), index, index); m_data.removeAt(index); endRemoveRows();@ And I worked on this bit of code separately from my main application. Will have to see what kind of fun awaits when I merge the changes with the rest of the application ;) Appreciate the help folks!
  • How to mix QML view part with a Qt model code.

    3
    0 Votes
    3 Posts
    844 Views
    Q
    If you are looking for another example, you can take a look at "the QxModelView module of QxOrm library":http://www.qxorm.com/doxygen/html/group___qx_model_view.html : this is an implementation of the QAbstractItemModel Qt class and allows to display in QML views (and Qt Widgets too) all classes/properties registered into QxOrm context. The source code is available in the QxOrm package. There is a FAQ here : http://www.qxorm.com/qxorm_en/faq.html#faq_300 And there is a sample project in the ./test/qxBlogModelView/ directory of QxOrm package. And with QxEntityEditor, you can also generate the source code for nested models to manage relationships between entities (1-n, n-1, n-n, 1-1).
  • QChart animation

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Mixing qrc and local QML files

    5
    0 Votes
    5 Posts
    2k Views
    F
    Hi, I've just posted on a similar thread, how it is possible to mix qrc and non-qrc files with "V-Play":http://v-play.net... You can find the forum thread "here":http://qt-project.org/forums/viewthread/52478/P15/#217901. Cheers, Chris
  • Problem with dynamically loaded images when using Qt Resource System

    17
    0 Votes
    17 Posts
    8k Views
    F
    Hi, I thought I'd step into this thread, maybe you can benefit from our learnings.. We have also been seeing issues with qrc in our projects, and the default Qt implementation has a couple of disadvantages: It is ugly to have to change the qrc:/ scheme in all your images - ideally you would not need to change the scheme when you switch between qrc and non-qrc Qrc has problems if the size of all combined images gets bigger than 50MB. Thus ideally you would ship the image assets separately as non-qrc, and use qrc for your qml files (to protect them from outside use). However, you still should have the option to also put the assets into qrc, if exposing your image files is a problem. That's exactly what we allow to do in V-Play: the QML & JS files are put into qrc files (this also makes sure no one can read your source code) – the assets are put into an own assets folder and are deployed with DEPLOYMENTFOLDERS += assets in the .pro file. You can also use qrc for assets if your prefer, but it has some limitations like the 50MB limit). That way, you don’t have the size limitation of qrc files (at above ~50MB qrc hangs). Also, during development working with DEPLOYMENTFOLDERS is better on Desktop, because you can just re-run your application and dont need to recompile. What we did additionally, is to abstract the file access, i.e. you dont need a prefix assets:/… for your images, or mix up your code with any qrc:/… prefixes. You can have a look at some .pro files of our games by downloading the "V-Play SDK":http://v-play.net and then check out the <QtSDK>/examples/V-Play/demos directory. I’ve also posted some comments about the qrc approach set as default since Qt Creator 3.1 on the Qt Blog, maybe that’s interesting to the pros and cons of it (and why I think it’s bad..): http://blog.qt.digia.com/blog/2014/03/04/qt-creator-3-1-beta-released/#comment-1193034 Hope that helps, Chris
  • Ticks labels on QValueAxis / QAbstractAxis

    1
    0 Votes
    1 Posts
    735 Views
    No one has replied
  • Non rectangle/custom shape button in QML. HOW?

    2
    0 Votes
    2 Posts
    2k Views
    JKSHJ
    Hi, You can use a custom-shaped image with transparency.
  • Exposing object from C++ to qml returns null

    6
    0 Votes
    6 Posts
    2k Views
    p3c0P
    Glad that its working :) Don't forget to delete that object or there would be a memory leak. Since it is in NotificationWindow widget you can pass it as a parent using this to MessageBoard so that when NotificationWindow gets deleted so does MessageBoard gets too.
  • [solved] Flickable: Items added from C++ not moving

    4
    0 Votes
    4 Posts
    1k Views
    p3c0P
    Glad that it worked :) You can mark the post as solved by editing the post title and prepend [solved].
  • [SOLVED] Problems with launching new window

    8
    0 Votes
    8 Posts
    3k Views
    sierdzioS
    [quote author="zword" date="1422633603"]bq. Android (and EGLFS) supports only one top-level window. Is it only for QML or QT (without QML) also supports only one top-level window?[/quote] Not even that, it is Android platform itself ;-) So yes, both QtWidgets and QtQuick support only one top-level window on Android.
  • Android app seems like exits on Back Button (in main activity)

    3
    0 Votes
    3 Posts
    2k Views
    Z
    Seems like i found the "solution":https://bugreports.qt.io/browse/QTBUG-29063
  • ListView loop, reaching bottom pressing Down Key selecting top

    3
    0 Votes
    3 Posts
    727 Views
    Z
    Thank you p3c0 you are useful as always
  • [solved] How to parse QList<QMap<QString, QVariant> >

    2
    0 Votes
    2 Posts
    1k Views
    T
    I solved this problem. I sent data in format QList<QVariant>.