Questions tagged [qquickitem]

The QQuickItem class provides the most basic of all visual items in QtQuick Module.

The QQuickItem class provides the most basic of all visual items in QtQuick Module.

All visual items in Qt Quick inherit from QQuickItem. Although a QQuickItem instance has no visual appearance, it defines all the attributes that are common across visual items, such as x and y position, width and height, anchoring and key handling support.

77 questions
0
votes
1 answer

Render a QQuickItem on a second window without changing its parent hierarchy

I have to render a QQuickItem owned by a particular window, into another. Basically MyQQuickItem owned by window1 to be rendered on window2. This switch has to happen in my app repeatedly due to a certain functionality. I do the following to achieve…
TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159
0
votes
1 answer

How to create a new QQuickItem copy from scratch on C++ side with the same properties as an existing one

I have a QQuickItem fetched from C++ side like this. QQuickItem * my_item = qmlEngine->rootObjects()[0]->findChild("ItemObjectName"); my_item is valid & has all the properties set on to it. Scenario I have 2 windows which need this…
TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159
0
votes
1 answer

How create a separate copy of a QQuickItem & render it on a different window

I have a QQuickItem fetched from C++ side like this. QQuickItem * my_item = qmlEngine->rootObjects()[0]->findChild("ItemObjectName"); my_item is valid & has all the properties set on to it. Scenario I have 2 windows which need this…
TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159
0
votes
1 answer

How to disable update on a QQuickItem

I have a QQuickItem derived class // Class class MyQQuickItem : public QQuickItem { Q_OBJECT } // updatePaintNode in cpp function QSGNode * MyQQuickItem::updatePaintNode(QSGNode * oldNode, UpdatePaintNodeData * updatePaintNodeData) { // draw…
TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159
0
votes
1 answer

How to translate a QQuickItem's position into its new parent

I have 2 QQuickItems like below which I can fetch on C++ side using the QMLEngine like this. QQuickItem * quick_item_1 = m_qml_engine->rootObjects()[0]->findChild("quickitem1"); QQuickItem * quick_item_2 =…
TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159
0
votes
1 answer

How to add a dynamically created QQuickitem to my application's main.qml or the QML list of items

I need to dynamically create a QQuickitem & add to my main.qml. Trying to do it, I create a QQuickitem in the following way. qml_engine->load(QUrl(QStringLiteral("qrc:/qml/main.qml"))); // Creating my QQuickItem here QQuickItem * dynamic_quick_item…
0
votes
0 answers

How to load a custom QQuickItem from inside a library so that it gets registered & updated like other QQuickItems in the application

I have a MyQuickItem class derived from QQuickItem as below // MyQuickItem.hpp class MyQuickItem : public QQuickItem { Q_OBJECT public: MyQuickItem(); virtual ~ MyQuickItem(); protected: QSGNode* updatePaintNode(QSGNode *,…
TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159
0
votes
1 answer

How can I get access to object of `QQmlApplicationEngine` inside a `QQuickItem` derived class?

The variable engine in the following typical main function of a QtApp is a valid instance of QQmlApplicationEngine. int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); QQmlApplicationEngine engine; …
TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159
0
votes
1 answer

How to create a dummy QQuickItem in C++ at runtime

I am using Qt 5.7 & unit testing using gtest or as its called googletests. I have a function to test which intakes a QQuickItem. To test this, I want to create a QQuickItem on fly when my unit test in run. Is it possible? Note that I do have access…
TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159
0
votes
0 answers

How to render a QOpenGLFramebufferObject to QQuickItem

I am using Qt 5.6 & above. I have a QQuickItem sub-class which is placed in my main.qml class MyQQuickItem : public QQuickItem { } In my main.cpp I register MyQQuickItem using qmlRegisterUncreatableType. It displays fine on the app main UI…
TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159
0
votes
1 answer

Are there gotchas with creating an instance of a QQuickItem subclass which instance I don't intend to render or add to a QML tree?

As you know, a QQuickFramebufferObject::Renderer subclass shouldn't access its parent item's properties directly, and instead should copy them to itself in its synchronize() method. So the code tends to look like this (using the AUTO_PROPERTY macro…
Stefan Monov
  • 11,332
  • 10
  • 63
  • 120
0
votes
2 answers

How to get a C++ object instance of a QQuickItem on C++ side

I have QtApp & a pure C++ library. The C++ library exposes a one simple class called MyCppLibApiClass. The QtApp has a class which is embedded on main.qml. Following is the class: class MyQuickItem : public QQuickItem { MyQuickItem(); } Following…
TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159
0
votes
2 answers

Share Text, Image and Url on Google+ without login

I would like to share Image with Url on Google+ without login on my iOS app. I have used : NSString *temp = @"Hello World"; // Construct the Google+ share URL NSURLComponents* urlComponents = [[NSURLComponents alloc] …
0
votes
0 answers

Class has no member name 'setAttribute'

I have a class which displays a map and therefore has to inherit from QQuickItem. I wish to integrate the pinch zoom function into the map display class however it was not possible to…
bull
  • 25
  • 5
0
votes
2 answers

draw multiple points with different colors in a QQuickItem

i want to render a plot with a lot of points (>1.000.000) and different colors in a custom QQuickItem. Later I want to animate these Points (fading between coordinates and colors), so I think QQuickPaintedItem is not fast enough for this and I must…
501 - not implemented
  • 2,638
  • 4
  • 39
  • 74