Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k Topics 77.7k Posts
  • <SOLVED>Is that possilbe to implement a normal scroll bar in QML?

    5
    0 Votes
    5 Posts
    2k Views
    L
    Thanks, guys. I will check it.
  • Setting up a slot for QmlApplicationViewer

    7
    0 Votes
    7 Posts
    4k Views
    M
    OK, the reason for the problem is, that findChild() does not check "id", it looks for "objectName" property. Thanks to http://www.lothlorien.com/kf6gpe/?p=309 . Moreover, invokeMethod() should be called after setMainQmlFile() and must not be trigered from QML (i.e. qml calls C++ function which calls javascript function) before it finishes the initialization (not even from Component.onCompleted) @ QMetaObject::invokeMethod( viewer->rootObject()->findChild<QObject *>("myModel"), // QML item "test" // method // parameters ); @ @ PageStackWindow { id: mainApp ... ListModel { id: myModel objectName: myModel ... function test() { console.log("TEST OK"); } } Page { ... } } @
  • How to change QML GridView model at run time

    5
    0 Votes
    5 Posts
    6k Views
    C
    If your model can remove or insert data than you must explicitly call the beginInsertRow endInsertRow between the code that alter the model data. Taken from the QAbstractListModel "doc":http://doc.qt.nokia.com/4.7-snapshot/qabstractlistmodel.html An insertRows() implementation must call beginInsertRows() before inserting new rows into the data structure, and it must call endInsertRows() immediately afterwards. A removeRows() implementation must call beginRemoveRows() before the rows are removed from the data structure, and it must call endRemoveRows() immediately afterwards. In the worst case you can use the beginResetModel and endResetModel like this: @ beginResetModel(); m_data.clear(); endResetModel(); @ otherwise the view is not notified of the change in the datamodel
  • SOLVED: Ajust QVTKWidget to window

    2
    0 Votes
    2 Posts
    2k Views
    3
    It is solved here: http://qt-project.org/forums/viewthread/20138/
  • How to remove item from QML GridView model

    2
    0 Votes
    2 Posts
    3k Views
    J
    if you are using QAbstractItemModel-based class as your model, implement remove() method as slot or as Q_INVOKABLE. make sure that appropriate model-changed signal is emitted within remove() method
  • MouseEvent breaking through QDeclarativeView and upwards!

    3
    0 Votes
    3 Posts
    3k Views
    M
    I am also facing the same issue.... I would like to move my widget using mouse.. But its not getting the mouse events... Upper layer of my widget will be QML.... this is inside constructor to load QML file... @view = new QDeclarativeView(this); view->setSource(QUrl("qml/Button.qml")); view->setAttribute(Qt::WA_TranslucentBackground); view->setStyleSheet("background:transparent;");@ These are the mouse events which i re-implemented, @void mousePressEvent(QMouseEvent* event) { event->accept(); // do not propagate if (isWindow()) offset = event->globalPos() - pos(); else offset = event->pos(); } void mouseMoveEvent(QMouseEvent* event) { event->accept(); // do not propagate if (isWindow()) move(event->globalPos() - offset); else move(mapToParent(event->pos() - offset)); } void mouseReleaseEvent(QMouseEvent* event) { event->accept(); // do not propagate offset = QPoint(); }@ Can anyone suggest a way to implement this...
  • QML DropArea accept external drag

    7
    0 Votes
    7 Posts
    7k Views
    C
    https://bugreports.qt-project.org/browse/QTBUG-27125
  • QML and JSON

    23
    0 Votes
    23 Posts
    57k Views
    K
    For anybody still interested, I've just published a JSONListModel component that works just like XMLListModel, but for JSON data instead. It's all pure QML/Javascript, and it even supports queries via JSONPath (XPath for JSON). You can read more about it there: "Devnet article":http://qt-project.org/wiki/JSONListModel
  • SOLVED: use a created vector as range for QDoubleSpinBox and QSlider

    5
    0 Votes
    5 Posts
    2k Views
    3
    Is there a different slider or widget that can support it or a way to go around that?
  • Grouping ListView elements

    11
    0 Votes
    11 Posts
    3k Views
    J
    ya I tried to use that but it does not work according to my rule:(
  • [SOLVED] QML parsing XML multiple tags with same name

    2
    0 Votes
    2 Posts
    2k Views
    M
    Got it... It is xpath!! SO mapped @hex[1]/string()@ and others to respective colors of rectangles...
  • Qt5 window manager should not render if root item is not visible

    2
    0 Votes
    2 Posts
    2k Views
    L
    I think you should either take this discussion to the mailing list (development@qt-project.org) or file a "bug report":https://bugreports.qt-project.org/.
  • Qt Quick or WebKit

    3
    0 Votes
    3 Posts
    2k Views
    V
    Hello, folks! We are just starting a development of a win/lin/mac network enabled application with video in it (that at some point might become a GPL app) and were discussing why one would invent Qt Quick if there is a fully blown HTML/CSS/etc. functionality for making GUI in WebKit. Using a QWebKit bridge one would expose all the back-end functionality to a JavaScript and just be done with it. This debate among us might seem a useless one but we must think it through to choose what technology to finally land on to write our application. I would very much appreciate any insight on the matter and may be there are some references that discuss the matter. Thanks in advance, Sergei
  • [SOLVED] Reference error in ListView highlight component

    8
    0 Votes
    8 Posts
    2k Views
    N
    Yeah, we Ant Farmers must stick together ;-)
  • 0 Votes
    3 Posts
    3k Views
    H
    the part [removed] is actually script and /script inside < > i have no idea why it changed to [removed] when i paste the codes.
  • Qgraphicswebview problems in qml

    7
    0 Votes
    7 Posts
    3k Views
    D
    I've seen them, but my problem is different, because my custom webview has also bad performances. But with normal qml webview everything works great.
  • Load QML built Video into IOS and andriod devices

    3
    0 Votes
    3 Posts
    2k Views
    P
    Please do not write to others threads to draw attention to your problem. You have posted it yesterday, please wait till somebody will have solution for you. Even worse, your problem is not specifying any kind of problem (the problem may not be always in Qt) - no one knows what video, to what, how do you "load" that video etc... please be more specific, when you urge us to help you.
  • [Closed] QML ShaderEffectItem does not work in ARM-based device with QNX

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    M
    Please don't "duplicate post":/forums/viewthread/19984/ questions. Thanks! (Closing this thread.)
  • [SOLVED] QML: calculate size for Rectangle from child Text content

    2
    0 Votes
    2 Posts
    15k Views
    A
    Ups, found in the docu: "Text.paintedHeight":http://qt-project.org/doc/qt-4.8/qml-text.html#paintedHeight-prop is exactly what i need
  • [solved] custom QML extension plugin

    6
    0 Votes
    6 Posts
    3k Views
    D
    Well, you can build your plugin within Qt Creator. Then just go to the directory where you stored the .pro file and run make install (or nmake install if you use windows). qmake and make commands should be run in console (in windows there is an entry in start menu called something like "Qt command prompt"). Another way could be to add a build step in Qt Creator, so every time you build, it will also be reinstalled. regards