Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Browsing all 4972 articles
Browse latest View live

how to get lists dynamically from c++

Hello folk, i have a set of listmodels in c++ that i am trying to view in QML. suppose i have 2 groups and each group contains a certain number of folders. i have written a few function that create...

View Article


JSONLoader reading from PHP

Hi all, We have an application that reads JSON from an external file to fill a ListView. Our code is: ListView {                ...

View Article


QT 5.4: Host QML control in MFC Application

Hi, I searched for features and bug but could not find much about this topic. We have a requirement to host a QML control in a MFC App. The form is of a MFC application on which we would like to host...

View Article

Dropping a new item into a drag-droppable GridView

I am trying to modify the GridView drag & drop example provided here: http://doc.qt.io/qt-5/qtquick-draganddrop-example.html I’m using Qt 5.4, QtQuick 2.4, QtQml.Models 2.1. The existing code...

View Article

Edit qml property from c++

I have a qml file that contains a number of properties (it displays a rectangle, and the properties are its dimensions). Is it possible for me to be able to alter those properties, lets say the ‘width’...

View Article


Edit qml property from c++

Yes. object->setProperty("width", 500); For more information see Interacting with QML Objects from C++ [doc.qt.io] .

View Article

how to get lists dynamically from c++

allright, so far so good… i have made all the lists and added the qqmllistproperty… Now my question is, how do i pass it to qml? ListView {   id: folderlist   model:...

View Article

newable script objects: QScriptEngine vs. QQMLEngine/QJSEngine

Good morning, I’m interested in adding C++ objects that can be instantiated from a script but I’m not sure how it works when combined with QtQuick. I’m trying to use the Q_SCRIPT_DECLARE_QMETAOBJECT...

View Article


filter mouse button press

Hello forum, I need to do different operations based on different mouse press event – want to do rotation when the left mouse is pressed and do the zooming when the middle mouse button is pressed over...

View Article


filter mouse button press

Easy:         MouseArea {             anchors.fill: parent        ...

View Article

newable script objects: QScriptEngine vs. QQMLEngine/QJSEngine

I was able to figure out something that might work. As a work around I declared a function as Q_INVOKABLE in the object that the script context inherits from. In that object I create a javascript...

View Article

Qt Quick emulation layer crashed

Hi All, Just started to look into QML, so I downloaded the latest build, that is 5.4.1 for VS 2013 ×64. Once I created brand new project with following setup: -Qt Quick Application -Component set: Qt...

View Article

[Solved] Setting model from C++ does not work on Androd ...

… but it does work on Desktop Ok, I am using Qt 5.4.1 (the latest) If I try to set a string list model from C++ it fails on actual Android device (Nexus 5), The screen is just black. However the same...

View Article


[SOLVED] Dropping a new item into a drag-droppable GridView

Found this helpful (in retrospect) part in a tutorial page: http://doc-snapshot.qt-project.org/qt5-5.4/qtquick-tutorials-dynamicview-dynamicview3-example.html The items property of DelegateModel...

View Article

[Solved] Setting model from C++ does not work on Androd ...

Thank your for fixing the problem. That was just ignorance on my part

View Article


[Solved]Edit qml property from c++

I published my third course on Qt this month. The final course is on Integrating Qt Quick with C++ [bit.ly]. Watching it might save you some time, your question is covered directly in the course....

View Article

How to paint in QML Canvas form C++?

I published my third course on Qt this month. The final course is on Integrating Qt Quick with C++ [bit.ly]. Watching it might save you some time. While it’s probably not obvious from the table of...

View Article


how to get lists dynamically from c++

If you want some background knowledge on working with QML from C++ I just published a course on that this month: Integrating Qt Quick with C++. http://bit.ly/qtquickcpp. This is the third course in the...

View Article

how to assign a QList to a listview in QML with QQmlListProperty?

I think the problem is that the class ListModel is not registered with the QML type system. You can register it using qmlRegisterType [doc.qt.io]: #include <QtQml>   int main(int...

View Article

Retrieve window geometry

Hi, I’m hacking around the missing support for (Wacom) graphics tablets in QtQuick. This is my component: import QtQuick 2.4 import domain.program 1.6 // TabletMessage   Item {  ...

View Article
Browsing all 4972 articles
Browse latest View live