Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.2k Posts
  • ListView is updated wrong when custom QSortFilterProxyModel changes

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • [SOLVED] Howto use BusyIndicator?

    2
    0 Votes
    2 Posts
    1k Views
    O
    Hi! In the meantime I have found a solution: @ import QtQuick 2.2 import QtQuick.Controls 1.1 Rectangle { id: main width: 360 height: 360 BusyIndicator { id: indicator anchors.centerIn: parent running: false } MouseArea { anchors.fill: parent onClicked: { indicator.running = true timer.start() } } Timer { id: timer repeat: false onTriggered: fct() } function fct(){ console.log(fib(35)) indicator.running = false } function fib(n){ if (n === 0 || n === 1){ return 1 } else { return fib(n-1) + fib(n-2) } } } @ Best regards, Oliver.
  • [Solved] Is it possible? I want to paint on QGraphicsScene !!HELP..

    3
    0 Votes
    3 Posts
    1k Views
    N
    hey thanku :)
  • 0 Votes
    3 Posts
    2k Views
    Q
    I have discovered that @geometry->setLineWidth(3); @in the code above extends to other QML elements and can distort them, even if those other QML elements are "normal" QML elements (with no QQuickItem subclass beneath them). This seems odd to me that you could affect other elements and I wonder if it is a bug? The documentation says that this function should only affect the current element, but that is not my experience. Can anyone weigh in on why @geometry->setLineWidth(3); @has such unwieldy power?
  • QML Styling issues

    2
    0 Votes
    2 Posts
    707 Views
    T
    Ad 1. Currently no. It is controlled by QT_QUICK_CONTROLS_STYLE env variable evaluated when first controls is used. Ad2. By using above variable but be informed that it is PRIVATE API and can be changed(e.g. disappear) in next Qt release.
  • Fetching "Done" button clicked from TextField on iOS

    1
    0 Votes
    1 Posts
    979 Views
    No one has replied
  • Distributing QtQuick application on Windows

    2
    0 Votes
    2 Posts
    974 Views
    sierdzioS
    I don't think qt.conf is required. Some users are reporting some additional dependencies, please search this forum. Also, please consider consulting the "deployment guide":http://qt-project.org/doc/qt-5.1/qtdoc/deployment-windows.html.
  • Run QtQuick tests from main.cpp

    1
    0 Votes
    1 Posts
    589 Views
    No one has replied
  • Qml file not found

    3
    0 Votes
    3 Posts
    2k Views
    K
    The C:/Users/emb-raghshu/build-TestProject-Desktop-Debug is your working directory. Your app is looking for the qml file in the working directory. But if you start the program the qml file ist still in your source directory. So place the qml file in the working directory or change the working directory in the project settings so that it points to the source directory.
  • [Solved]Any example of StackView?

    2
    0 Votes
    2 Posts
    2k Views
    S
    I find an example by myself "example":http://qt-project.org/doc/qt-5.1/qtquickcontrols/touch-main-qml.html If you know more examples of StackView, please show me, thanks.
  • Qt5 bug Listview or QAbstractModel??

    1
    0 Votes
    1 Posts
    684 Views
    No one has replied
  • How to return pixels from QPixmap to QML

    1
    0 Votes
    1 Posts
    760 Views
    No one has replied
  • [ListView]How to use C++ to add Row for ListView?

    2
    0 Votes
    2 Posts
    1k Views
    V
    There is an unofficial way. use QMetaObject::invokeMethod @ QQmlApplicationEngine engine(QUrl("qrc:/qml/main.qml")); QObject *topLevel = engine.rootObjects().value(0); QQuickWindow *window = qobject_cast<QQuickWindow *>(topLevel); if ( !window ) { qWarning("Error: Your root item has to be a Window."); return -1; } window->show(); QObject model = topLevel->findChild<QObject>("listmodel"); if (model) { qDebug() << "model exists"; QVariantMap newElement; // QVariantMap will implicitly translates into JS-object newElement.insert("name","from cpp"); QMetaObject::invokeMethod( model, // for this object we will call method "append_", // actually, name of the method to call Q_ARG(QVariant, QVariant::fromValue(newElement)) // method parameter ); } @ main.qml contains @ ListView { id: list_view1 anchors.fill: parent delegate: Item { x: 5 height: 40 Row { id: row1 spacing: 10 Text { text: name font.bold: true anchors.verticalCenter: parent.verticalCenter } } } model: ListModel { id: myModel objectName: "listmodel" function append_(newElement) { append(newElement) } } }@
  • QML animation not working

    3
    0 Votes
    3 Posts
    2k Views
    D
    [quote author="Kysymys" date="1387069766"]To apply animations related to changes to the model, you should use the transition properties of the ListView. See "ListView.move":http://qt-project.org/doc/qt-5.1/qtquick/qml-qtquick2-listview.html[/quote] That function is available only in Qt 5, I am using Qt 4.7.
  • MediaPlayer Metadata is gone in QT5.2??

    4
    0 Votes
    4 Posts
    1k Views
    SGaistS
    You might have found a regression then. Have a look at the "bug report system":http://bugreports.qt-project.org to see if it's already known. If not you could consider creating a new report. You should provide a minimal compilable example that shows the problem.
  • QlineEdit

    2
    0 Votes
    2 Posts
    859 Views
    mranger90M
    QLineEdit::text() i.e. @ QLineEdit e; QStrint s; ..... s = e.text(); @
  • How to design a custom videoOutput?

    2
    0 Votes
    2 Posts
    822 Views
    S
    I tried grab() function before, but this solution can't work on android,it will crash I find through the document and exmaples but have no clue of how to get the buffer of videoOutput, safe the result after postprocess or create my own videoOutput
  • How to add Item to ListView with C++?

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • MVC best practices in QML?

    3
    0 Votes
    3 Posts
    1k Views
    V
    use "StackView":http://qt-project.org/doc/qt-5/qml-qtquick-controls-stackview.html
  • How to get the image buffer of videoOutput?

    1
    0 Votes
    1 Posts
    640 Views
    No one has replied