Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k Topics 77.6k Posts
  • 0 Votes
    2 Posts
    811 Views
    S
    Because of signature is onImageCaptured(requestId, preview) so the preview is the parameter of the signal
  • Key navigation image change.

    2
    0 Votes
    2 Posts
    892 Views
    A
    Hi, why are you using the focus attribute? If you want key navigation, then use "KeyNavigation":http://qt-project.org/doc/qt-5.0/qtquick/qml-qtquick2-keynavigation.html - with two or more Image elements with separate sources specified. Second thought: seeing that you want to implement highlighting and would rather have one Image element, I want to point out that you're "binding":http://qt-project.org/doc/qt-5.0/qtqml/qtqml-syntax-propertybinding.html the source property to the focus property, which in turn you set to true. Make sure that you have the focus property changed at some point. This "stackoverflow.com thread":http://stackoverflow.com/questions/16343196/qt-qml-keyboard-and-mouse-does-not-work-together-to-change-the-source-image has a similar problem.
  • Qml root deleted on startup

    6
    0 Votes
    6 Posts
    2k Views
    C
    I am having this same problem. I created the following bug: https://bugreports.qt-project.org/browse/QTBUG-31678
  • Return var from js file to qml.

    2
    0 Votes
    2 Posts
    1k Views
    A
    Hello, you have some nested function definitions but you don't actually call them, hence the return is undefined. Try moving the inner function definition aside and calling it as an argument to the transaction() function instead. You will have to provide a variable to assign to as well, since currently you do nothing with the returned variable in the outer function.
  • [SOLVED] Updating single item in CppModel does not update QML

    9
    0 Votes
    9 Posts
    10k Views
    O
    I solved it! To make it work I implemented my own setData() in CppModelItem, which seems really straight-forward when you think of it! @ void CppModelItem::setData(const QVariant &value, int role) { if( role == NameRole ) { m_name = value.toString(); this->model()->dataChanged(this->index(), this->index()); } } @ In the setData() I call the models dataChanged() with this index and everything works!
  • How to draw the area chart by using canvas ?

    2
    0 Votes
    2 Posts
    2k Views
    J
    Canvas implements the html5 canvas API. In other words you can google up "how to draw area charts in html5" and use those guides almost without modification. Try for instance this page: http://developer.apple.com/library/safari/#documentation/AudioVideo/Conceptual/HTML-canvas-guide/CreatingChartsandGraphs/CreatingChartsandGraphs.html
  • To display video on qml (Qt-5)

    4
    0 Votes
    4 Posts
    2k Views
    B
    Here some sample of video player on QML: @import QtQuick 1.0 import QtMultimediaKit 1.1 // do not forgot to import this Item { id: videoPlayerItem property bool isVideoPlaying: videoPlayer.hasVideo // property to know if videoPlaying id ongoing or not /* Functions Which starts Video Playing / function playVideo(){ videoPlayer.play() } / Function Which Stops Video Playing / function stopVideo(){ videoPlayer.stop() } / Function Which Stops Video Playing / function pauseVideo(){ videoPlayer.pause() } / Actual QML based Video Component */ Video{ id:videoPlayer anchors.fill: videoPlayerItem // never forget to mention the size and position source: "Video/Bear.wmv" focus: true } }@
  • 0 Votes
    10 Posts
    5k Views
    sierdzioS
    I'm glad to hear that! Happy coding! Please add "[Solved]" to thread's title (you need to edit your initial post) if you have a spare minute.
  • Mouse cursor visible on Android mobile 5.1.0 beta 1 build ?

    2
    0 Votes
    2 Posts
    1k Views
    R
    This was a bug that was reported.
  • Weird behavior when switching the view between Image and Camera

    2
    0 Votes
    2 Posts
    930 Views
    S
    I explicit specified the state of "FULLSCREEN" in main.qml as @ State { name: "FULLSCREEN" PropertyChanges { target: photoTest; state: param.fullScreenPreviousState == "PHOTO" ? "PHOTO" : "CAMERA"} //new conditon PropertyChanges { target: toolBarTest; width: 0} } @ We have to explicit specify all of the conditions of different components when changing state?
  • QtQuick 2 laggy?

    7
    0 Votes
    7 Posts
    3k Views
    Z
    I tried the angle version of qmlscene and the resizing is now much smoother, thanks :)
  • Qml screens on dual monitor(Qt-5 -ubuntu)

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • To capture image from video frame qml(Qt -5)

    2
    0 Votes
    2 Posts
    3k Views
    A
    Hello, the only QtMultimedia element that has screen capturing capabilities on its own is CameraCapture, related to camera functionality. Perhaps capturing an image from C++ side is possible through "QGraphicsScene::render":http://qt-project.org/doc/qt-5.0/qtwidgets/qgraphicsscene.html#render or "QGraphicsView::render":http://qt-project.org/doc/qt-5.0/qtwidgets/qgraphicsview.html#render, but I am not sure. See also "this thread":http://qt-project.org/forums/viewthread/27117 with its "QQuickView::grabWindow":http://qt-project.org/doc/qt-5.0/qtquick/qquickwindow.html#grabWindow recommendation.
  • ListView doesn't update after changing data in QStringListModel

    3
    0 Votes
    3 Posts
    3k Views
    D
    Hi sierdzio, That's true for QStringList-based models and QObjectList-based models. But in this case I'm dealing with QStringListModel, a QAbstractItemModel subclass. In the third section of the page you mention: bq. QML views are automatically updated when the model changes. Remember the model must follow the standard rules for model changes and notify the view when the model has changed by using QAbstractItemModel::dataChanged(), QAbstractItemModel::beginInsertRows(), and so on. See the Model subclassing reference for more information. The thing is that the model automatically notifies the changes (as a QAbstractItemModel subclass) but for some reason it doesn't take effect. Thank you for your reply, anyway :-)
  • QMenuBar CSS problème

    2
    0 Votes
    2 Posts
    1k Views
    A
    Hello, please don't post multiple threads on the same topic. One is enough. Since you request help with programming GUI using Qt widgets, stick to "this thread":http://qt-project.org/forums/viewthread/28644/.
  • How to convert QML Object to QImage ?

    3
    0 Votes
    3 Posts
    1k Views
    S
    Yes i want to print it. I know how to use QPrinter but i want the QImage of a child QML Item of my view and not all the view. Thank You.
  • Using qml sql to pull data but how can I use it to be displayed.

    2
    0 Votes
    2 Posts
    1k Views
    S
    I think that you can find in this "learning guide":http://releases.qt-project.org/learning/developerguides/qtquickdesktop/QtQuickApplicationGuide4Desktop.pdf how to read from the database.
  • SequentialAnimation runs but not ParallelAnimation

    1
    0 Votes
    1 Posts
    681 Views
    No one has replied
  • Custom QML View

    1
    1 Votes
    1 Posts
    1k Views
    No one has replied
  • Lost image, mousearea... drag and drop in design mode

    2
    0 Votes
    2 Posts
    1k Views
    G
    You should just press the bar where it says "Open Documents", and you will get a context menu where you can select Library and it should be what I think you want.