How to set different colors from cpp to the rectangle in Qml
-
wrote on 4 May 2020, 09:29 last edited byThis post is deleted!
-
Hi,
You should share a minimal compilable example. Otherwise its impossible to guess what is going wrong.
-
Hi,
You should share a minimal compilable example. Otherwise its impossible to guess what is going wrong.
-
wrote on 4 May 2020, 19:15 last edited by eyllanesc 5 Apr 2020, 19:17
@sush123 See my answer of similar question in SO: https://stackoverflow.com/questions/51300494/drawing-multiple-rectangles-into-image-in-qml Or https://stackoverflow.com/questions/54858514/qml-nested-rectangles, The last post is written for PySide2 but the logic can be translated for Qt/C++
-
I need to set x and y position and color from Cpp model instead of setting in qml , how can i set it using QStandardItemModel?
wrote on 4 May 2020, 19:27 last edited byThis post is deleted! -
@sush123 See my answer of similar question in SO: https://stackoverflow.com/questions/51300494/drawing-multiple-rectangles-into-image-in-qml Or https://stackoverflow.com/questions/54858514/qml-nested-rectangles, The last post is written for PySide2 but the logic can be translated for Qt/C++
wrote on 4 May 2020, 20:08 last edited byThis post is deleted! -
@sush123 Which exact line in your code causes this error?
The error message already suggest you a solution: https://doc.qt.io/qt-5/qmetatype.html#Q_DECLARE_METATYPE -
@sush123 Which exact line in your code causes this error?
The error message already suggest you a solution: https://doc.qt.io/qt-5/qmetatype.html#Q_DECLARE_METATYPEwrote on 5 May 2020, 06:39 last edited by sush123 5 May 2020, 07:27This post is deleted!
1/8