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
1
vote
1 answer

Is it possible to get QQuickItem layout change event?

Is it is possible QQuickItem layout change? Is there a way to trigger function when layout/size ( x, y, width or hight) is changed? There is way to connect on every propery signal change but this is not right way. Already tried windowChanged signal…
Luka
  • 472
  • 4
  • 18
1
vote
1 answer

How to transform a QQuickItem's x or y property based on its current value without using a QML function

I am using Qt 5.9.3 commercial version. Scenario I have logic to be executed in Qt QML part of the my code. On click of some random button. I want to move a QML rectangle to another position. The other position is a calculated (x, y) position based…
TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159
1
vote
1 answer

How to pan a QML item on MouseArea drag

I have a Qt app which runs on iOS and OSX using Qt 5.10 commercial version. I have a QML item which hosts an image. I am trying to pan the QML item when user's finger drags on it OR mouse is dragged. Following is somewhat I am trying to make my QML…
TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159
1
vote
1 answer

Adding QQuickItem pointers to an std::map makes them all "not accessible" pointers or items

This question involves Qt but could be pure C++ problem with my logic. I am adding QQuickItems to an std::map store info about a list of QQuickItems & their respective parents. The code: std::array ObjectNamesArray = {…
TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159
1
vote
1 answer

How to size the texture to occupy only a portion of a QQuickItem UI

I have overriden updatePaintNode in the following way to draw an OpenGL texture on a QQuickItem derived class called MyQQuickItem here. QSGNode *MyQQuickItem::updatePaintNode(QSGNode * oldNode, QQuickItem::UpdatePaintNodeData *…
TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159
1
vote
0 answers

How update a QQuickItem created only at C++ level

I have a QQuickItem derived class like below class MyQQuickItem : public QQuickItem { Q_OBJECT public: MyQQuickItem(QQuickItem *parent = 0); ~ MyQQuickItem(); QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *); }; I have my own…
TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159
1
vote
0 answers

Qt: Updates can only be scheduled from GUI thread or from QQuickItem::updatePaintNode

How can call update() on QQuickItem from a worker thread without causing the following warning? Updates can only be scheduled from GUI thread or from QQuickItem::updatePaintNode() I want to enforce QQuickItem::updatePaintNode() to execute. I…
TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159
1
vote
1 answer

how to clip an image along specific path in qml

I have a Background groove image for which I have to produce progress bar effect using Progress filling Image How to clip the Progress filling Image along the Path of the groove of the Progress Bar (Background groove image). Currently I am trying…
Ashwini Shet
  • 45
  • 1
  • 6
1
vote
1 answer

Qt compiler error when trying to use QQmlListProperty

I'm trying to use QQmlListProperty to expose a QList from within a QQuickItem - and following the documentation at: Properties with Object-List Types QQmlListProperty Class A simplified example: #include #include…
HorusKol
  • 8,375
  • 10
  • 51
  • 92
1
vote
0 answers

How to map a saved texture directly on a QuickItem & display it?

In my Qt app with C++, I am using a QQuickItem derived class to display textures which are produced on every frame render by running some filters on each frame render. this works fine. Next, I used the takeTexture method provided by…
TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159
1
vote
0 answers

Purpose of focusInEvent and focusOutEvent in QQuickItem

Its basic Qt5 question, some explanation how they behave will be good. I am confused with focusInEvent/focusOutEvent in case of QQuickItem. since QQuickItem has concept of activefocus which get notified to item with ItemChanged event, also…
SanTosh
  • 61
  • 7
1
vote
3 answers

How to create custom Quick QML Item with predefided states

I am quite new to Qt, so I am probably asking a pretty obvious question. I would like to create a super type for all of my custom QML GUI elements that I want to create in C++. This super type is supposed to add predefined states to a QML Item.…
user1997675
  • 144
  • 1
  • 10
1
vote
2 answers

QtQuick custom OpenGL rendering

I am using QtQuick with a custom OpenGL renderer (custom from the point of view of QtQuick as it is simply OpenSceneGraph). In order to do so I create a custom QQuickItem inheriting from QQuickFramebufferObject and that in turns creates a custom…
arennuit
  • 855
  • 1
  • 7
  • 23
1
vote
1 answer

How to get model in onCurrentItemChanged with QtQuick ListView

I use the listview like this: ListView { id: list clip: true spacing: 2 anchors.fill: parent model: datas delegate: listItem onCurrentItemChanged: { //I want get the part of…
behtgod
  • 251
  • 3
  • 15
1
vote
0 answers

transform coordinates in a QQuickPaintedItem

I want to create a plugin which is derived from QQuickPaintedItem where the user can pan and zoom over the painted image. For zooming I'm using the method setContentsScale. Now I want to transform the anchor of the painted image, so I can panning.…
501 - not implemented
  • 2,638
  • 4
  • 39
  • 74