Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.4k Posts
  • Size of bold font changes between 5.3 and 5.2.1 qt - Any workaround?

    1
    0 Votes
    1 Posts
    490 Views
    No one has replied
  • How to change scenes in QML?

    0
    0 Votes
    0 Posts
    728 Views
    No one has replied
  • QQmlFileSelector not working on Android from assets folder

    2
    0 Votes
    2 Posts
    2k Views
    D
    Same for me, with Android it does not work. :( I make same tests with same results.
  • QML project can't be run by Static Qt linking version , Qt 5.2

    30
    1 Votes
    30 Posts
    14k Views
    M
    I just solved the problem. The key feature was in start configure from Src folder, NOT from Src/qtbase. But i have another problem. Applications works on my computer, but not works on another. In QtCreator\Qt Versions i see warning: Non-installed -prefix build - for internal development only. In qt i am a newbie and i do not know what it is means. Help me please!
  • Strange question in AnimatedImage

    2
    0 Votes
    2 Posts
    625 Views
    C
    Well, if I destroyed the AnimatedImage objects in the first QML before the second QML be loaded, it works. But i don't know why, AnimatedImage object can't exist two or more in the same time?
  • Qml Timer Alternative

    1
    0 Votes
    1 Posts
    899 Views
    No one has replied
  • Undefined reference to `vtable for MyClass'

    2
    0 Votes
    2 Posts
    1k Views
    L
    Oh I finally solved the problem myclass.h @ #ifndef MYCLASS_H #define MYCLASS_H #include <QObject> class MyClass : public QObject { Q_OBJECT public: explicit MyClass(QObject *parent = 0); signals: public slots: void helloMethod(const QString &msg); }; #endif @ myclass.cpp @ #include "myclass.h" #include <QDebug> MyClass::MyClass(QObject *parent) : QObject(parent) { } void MyClass::helloMethod(const QString &msg) { qDebug() << "Called the C++ slot with message:" << msg; } @
  • [Solved] Best practice associating event handlers with state changes

    2
    0 Votes
    2 Posts
    646 Views
    S
    The only workaround I've found so far is: @ Keys.onPressed: keyHandler(event) property var keyHandler: function(event){} ... PropertyChanges { target: whatever keyHandler: function(event){console.log(event.text)} } @
  • Is there a way to see QML files in "live" ? [solved]

    3
    0 Votes
    3 Posts
    1k Views
    A
    Hi, Thanks. I see that. Sincerely
  • 0 Votes
    1 Posts
    725 Views
    No one has replied
  • Create and Control a QML Component from C++

    2
    0 Votes
    2 Posts
    2k Views
    D
    This is how I did it, please go through it and suggest any changes or different approaches for doing the same. @QtQuick2ApplicationViewer *viewer = QtQuick2ApplicationViewer::instance(); QQmlContext *context = viewer->rootContext(); context->setContextProperty("_client", &client); /Main QML File/ viewer->setMainQmlFile(QStringLiteral("qml/qml-dynamic/main.qml")); viewer->showExpanded(); QQmlEngine *engine = viewer->engine(); /dynamically loaded component/ QQmlComponent component(engine, QUrl::fromLocalFile("qml/qml-dynamic/dyn-comp.qml")); QObject *object = component.create(); QQuickItem item = qobject_cast<QQuickItem>(object); /In qml, items won't get drawn unless they are parented to the view./ /* You should always use QObject::setProperty(), QDeclarativeProperty or QMetaProperty::write() to change a QML property value, to ensure the QML engine is made aware of the property change. / object->setProperty("parent", QVariant::fromValue<QObject>(viewer->rootObject())); /This works same as setProperty/ // QQmlProperty::write(object, "parent" // , QVariant::fromValue<QObject*>(viewer->rootObject())); QQmlEngine::setObjectOwnership(object, QQmlEngine::CppOwnership); /Set X and Y properties of the item created./ item->setx(150); item->setY(150);@
  • QML dropdown list/combobox-like in tableview , z-ordering of items

    5
    0 Votes
    5 Posts
    7k Views
    G
    OK,I have found the problem. I can't change the parent in Component.onCompleted.I need to change it in MouseArea's onClicked signal which I want to popup the dropdown list. @ MouseArea { width: 400 height: 30 anchors.bottomMargin: 0 anchors.fill: parent; hoverEnabled: true onClicked: { combo.state = combo.state==="dropDown"?"":"dropDown" // Reparent the dropDown to the top-level item so that it always stays on top of all other items var topLevel = dropDown while(topLevel.parent) { topLevel = topLevel.parent } var coordinates = dropDown.mapToItem(topLevel, 0, 0) dropDown.parent = topLevel dropDown.x = coordinates.x dropDown.y = coordinates.y } }@
  • Loading a another view fro list items

    1
    0 Votes
    1 Posts
    487 Views
    No one has replied
  • Bug when using Loader in a directly instantiated QQuickView

    2
    0 Votes
    2 Posts
    683 Views
    GianlucaG
    File a bug report on http://bugreports.qt-project.org/
  • Converting object to string

    8
    0 Votes
    8 Posts
    15k Views
    L
    Happened here too. Probably you should submit a bug report. Doesn't happen to cpp exported object or js object
  • ComboBox not draw on core profile?

    1
    0 Votes
    1 Posts
    471 Views
    No one has replied
  • [solved] Dynamically adding items

    3
    0 Votes
    3 Posts
    874 Views
    D
    Oops, you're right! The status is 3 (Component.Error), and the errorString showed there was an error in the qml file I was trying to load. Thanks for the hint!
  • QtQuickItem with custom opengl draw - after first frame, item dissapear

    3
    0 Votes
    3 Posts
    1k Views
    K
    pleas Qt guys, does anyone know where is problem?
  • [SOLVED] QML ScreenSaver element in Qt 5.x?

    9
    0 Votes
    9 Posts
    5k Views
    A
    Fo screensaver I had to go down in java.
  • Rectangle as a root error in QtQuick project

    4
    0 Votes
    4 Posts
    2k Views
    JKSHJ
    You're welcome :) [quote author="freddy311082" date="1401503871"]when is it better use QQmlApplicationEngine and QQuickView ??[/quote]If you want a top-level QML window that has a menubar, statusbar and/or toolbar, then you should use QQmlApplicationEngine (with "ApplicationWindow":http://qt-project.org/doc/qt-5/qml-qtquick-controls-applicationwindow.html as your root). If you want to embed a QML GUI inside a widget GUI, you should use QQuickView (Qt 5.0 -- Qt 5.2) or QQuickWidget (Qt 5.3 and later). But if you don't need either of these, then it doesn't really matter which one you choose.