Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k Topics 77.6k Posts
  • Start animation when app loaded [solved]

    4
    0 Votes
    4 Posts
    1k Views
    D
    You rule portoist
  • Video/media playback (noob question)

    1
    0 Votes
    1 Posts
    577 Views
    No one has replied
  • Program crash when I combine Loader and ProgressBar

    5
    0 Votes
    5 Posts
    2k Views
    S
    Filed it already, thanks for your help. Hope that Qt5 could become more stable with every release
  • Extract Context Properties from C++ Code

    4
    0 Votes
    4 Posts
    1k Views
    sierdzioS
    OK. Parsing the QML is an option, but probably too cumbersome. You would need to do it before loading the QML. Once you load it, it will throw errors on properties that were not included, which is not what you want. What about a "just in time" property inclusion? Instead of adding numerous Q_PROPERTYies, provide an object with something like: @ Q_INVOKABLE QVariant getProperty(const QString &propertyName); Q_INVOKABLE void setProperty(const QString &propertyName, QVariant value); @ But this way you will loose all the NOTIFY goodness. Or you could divide your properties into modules and include them in QML using import statements.
  • [Partially Solved] QML & qmlRegisterType

    5
    0 Votes
    5 Posts
    3k Views
    F
    So, in new qt qiuck2 .0from qt 5.1 i can use qmlRegisterType or not? Can't find information about it. :{ edit: http://doc-snapshot.qt-project.org/qt5-stable/qtquickdialogs/qml-qtquick-dialogs1-filedialog.html
  • 0 Votes
    15 Posts
    6k Views
    JKSHJ
    You're welcome :) Yeah, the "best" code architecture can be different for different purposes. I don't have any direct ideas for now, sorry. But keep learning and asking. Good luck!
  • QML signal problem

    2
    0 Votes
    2 Posts
    1k Views
    D
    Never mind. It is working now, don't know what happened (I did "clean", and then "build" in both DLL and application).
  • Command prompt in Qt

    3
    0 Votes
    3 Posts
    1k Views
    A
    thank you .Sorry...
  • Is there any way to refresh/update a Context Property

    3
    0 Votes
    3 Posts
    2k Views
    M
    thx for answer. i solved this problem by setting the context property each time i update it. i mean @ //helper class.. void onMapUpdated() { this->_viewer->rootContext()->setContextProperty("theMap", theMap); } @ i passed the ApplciaitonViewer object as a paramter to the helper class constructor. it is working now. but im worried about its drawbacks. what can they be? do u have an opinion?
  • Load transparent frame with list control

    1
    0 Votes
    1 Posts
    510 Views
    No one has replied
  • Qt quick example not working

    2
    0 Votes
    2 Posts
    910 Views
    S
    "onClicked" not "onClicke[drive]" @ MouseArea { anchors.fill: parent onClicked: { Qt.quit(); } } @
  • [Solved]Ask the Flickable don't hide the toolBar

    3
    0 Votes
    3 Posts
    983 Views
    S
    Thanks, I haven't noticed I could use clip to achieve it
  • [Solved]Create a read only property in qml

    3
    0 Votes
    3 Posts
    8k Views
    S
    Thanks for your helps
  • 0 Votes
    8 Posts
    2k Views
    sierdzioS
    Majority of Android users are still running Android 2.3.x. I'm not entirely up-to-date with Qt on Android, so I can't say much about it. It is based on NDK, though, so Qt should not care too much for the SDK. Run SDK manager and download additional SDKs if you need to.
  • Qrc : cannot find file/directory issues

    6
    0 Votes
    6 Posts
    8k Views
    ?
    Hi Slerdizlo, Recently i got a solution for the question that i have asked and I want to write it in here. May be some others are also got this issue, I got the solution from the Qt forum, http://qt-project.org/forums/viewthread/7047 Thanks to Denis Kormalev, Volker and Brucewuu for solving this problem. If you can go through this link, you can easily understand it. For accessing any file outside QRC, use "absolute filepath" of the file. For example: In main.cpp file; QString path = QDir::currentPath(); //path where the exec is present if your file is in src/file.qml of exec folder, then you can access it like (path += "/src/file.qml";), now path is the absolute file path for file.qml. You can access it in any of the QRC file. QQuickView view; view.rootContext()->setContextProperty("myFile", path); view.setSource("qrc:/main.qml"); In main.qml file: Loader { id: loadItem source: myFile } Item { Component.onCompleted: loadItem.item } Regards Ansif
  • [Solved]ScrollView and Flickable don't respect Image.PreserveAspectFit

    4
    0 Votes
    4 Posts
    2k Views
    S
    Thanks to both of you and sorry that I haven't mentioned my intentions clearly. when the image is too large,I want to handle the view with two ways 1: when the fillMode is Pad, I could use the scrollView or flickable to view the whole image 2: when the fillMode is PreserveAspectFit, the image will shrink to appropriate size Since it is impossible to do it with Flickable or ScrollView, I would find another solutions, like create a new component, with two Images, when the fillMode is PreserveAspectFit, I show the Image with ScrollView or Flickable; change it back to normal Image when it is other fillMode
  • QML text rendering performance unacceptably slow

    3
    0 Votes
    3 Posts
    3k Views
    S
    Hi, Thanks, setting the rendertype to native fixed the problem! I'm not keen on trying to install a separate Qt from the one that comes from the Ubuntu repository, which lags a bit behind. Nice to know there's some performance gains still to come. Regards
  • Debugging QML throught Qt Quick 1 App (using cmake)

    1
    0 Votes
    1 Posts
    830 Views
    No one has replied
  • RubberBand in qml

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • 0 Votes
    2 Posts
    1k Views
    sierdzioS
    Possibly. However, there are no plans to deprecate or remove it. Sleep safe :) IMO, it's ready. People have different opinions here, though, and it depends on your use case. Definitely, both Widgets and Quick have their benefits, so it's best to pick whatever suits your project best. From my own experience, I'll say that QML and declarative mindset is the way to go. It's just so easy to build the UI this way :) QtQuick1 uses QGraphicsView, QtQuick2 uses Scene Graph - both are available in Qt5. Again, this is up for a debate, but scene graph is rather potent in power :) Functionality of scenegraph and QGraphicsView does not fully overlap, so they can't really be objectively compared without going into specific details. If your project will be used by other people, stick with Qt4 for a while, as Qt5 is still not in all repos.