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
16
votes
2 answers

How to make a resizable rectangle in QML?

I'm looking for a simple way to create a rectangle in a QQuickItem. I want to resize, and drag the borders of this rectangle like this (found at resizable QRubberBand) Has someone an idea?
501 - not implemented
  • 2,638
  • 4
  • 39
  • 74
14
votes
1 answer

How to expose C++ structs for computations to Qml

I have the following problem. I am developing a model in C++ and a View in Qml, connecting them via Controllers. In my model I perform multiple calculations. I also offer users of my application the possibility, to write custom event handlers,…
MattW
  • 461
  • 3
  • 10
4
votes
1 answer

How to paint sequential image in efficient way in QQuickPaintedItem

For some reason, I needs to wrap opencv VideoCapture in a class which will be used in Qt Quick. There are two classes, one is Camera, other is CameraView. CameraView inheritd from QQuickPaintedItem. Camera class will get image periodically. It…
A.J
  • 338
  • 1
  • 4
  • 16
4
votes
1 answer

What is the QQuickItem::mapToItem return type?

The application below outputs coordinates mapped from one QQuickItem to another. According to the docs: object mapToItem(Item item, real x, real y) Maps the point (x, y) or rect (x, y, width, height), which is in this item's coordinate system,…
Evgeny Timoshenko
  • 3,119
  • 5
  • 33
  • 53
3
votes
1 answer

QQuickItem parent item null in constructor

I am interested in accessing attributes of a qml parent through a c++ QQuickItem. I have a custom QQuick item called VisibleTag the extends QQuickItem. Any qml item containing this object Tag, I would like set as visible or invisible based off other…
piper2200s
  • 151
  • 7
3
votes
1 answer

How to retrieve the value of a QML property from C++?

I have the following QQuickItem defined in main.qml. Flickable { id: my_quick Accessible.name: "my_quick_item_name" objectName: "myquickitem" enabled: true property real quickProperty: 1.0 } I get my_quick object in the following way on…
TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159
3
votes
0 answers

QSGGeometry: Is it fast to upload tons of vertices every frame?

I'm developing a realtime log plotter using Qt Quick 2. It receives log data like every millisecond, and I'd like to plot it incrementally (to a parametric curve) using a custom QQuickItem. Currently I'm planning to use QSGGeometry and send vertex…
eivour
  • 1,678
  • 12
  • 20
3
votes
1 answer

What is difference between QQuickView and QQuickItem?

I am suppose to inherit QQuickItem instead of QQuickView to write interface in C++ using QQuick class. From the explanation provided in Qt documents I understood QQuickView loads qml. QQuickView is used to integrate a displayable QML object into an…
Tejaswini
  • 29
  • 5
3
votes
1 answer

Efficiently getting from a QPaintDevice to a QSGTexture in QQuickItem

My custom QQuickItem currently does the following Create a QSGNode that subclasses QSGSimpleTextureNode In the nodes preprocess function, create a QOpenGLFramebufferObject to draw to Draw on the QOpenGLFramebufferObject using a QPainter Display the…
3
votes
2 answers

how to draw text in QQuickItem

I've been searching the internet how to draw or render text on QQuickItem but to no avail. I opt not to use QQuickPaintedItem which uses QPainter paint() function. Aside from that there is also a known issue of QQuickPaintedItem on iOS retina…
matteoL
  • 41
  • 4
2
votes
1 answer

Poor rendering quality in custom QQuickPaintedItem

I have a created a small drawing application in QML, I created a small subclass of QQuickPaintedItem. Then in QML, I used a MouseArea to feed the input to my class. From there I simply store the mouse positions in a vector and then paint the points…
reckless
  • 741
  • 12
  • 53
2
votes
0 answers

Why does a scaling matrix causes the vertices to exit bounds of QQuickItem?

I am trying to understand the behavoir of OpenGL ES vector shader within QQuickItem. I started with the "graph" example, and then I tried to scale samples of arbitrary minimum and maximum values into the QQuickItem bounds (in order to achieve a…
Fab
  • 139
  • 11
2
votes
0 answers

Howto render QtQuick item into texture

I have a custom QQuickFramebufferObject node which renders a texture on some geometry. Now I want to render a Qml item to a texture (e.g. QOpenGLTexture) and use this texture in my custom node. I know that there is the grabToImage…
Hyndrix
  • 4,282
  • 7
  • 41
  • 82
2
votes
1 answer

How to react on a change of visibility of children?

I have different container items and I would like to make not visible when all of their children are not visible. Dynamically, some code is parsing all the items recursively and set them visible or not visible depending on some filter (like a search…
ymoreau
  • 3,402
  • 1
  • 22
  • 60
2
votes
2 answers

Qt: How to merge 2 QQuickItems into one before saving it into a png

From this discussion on StackOverflow, I am well able to save an image out of a QML item into a file as png/jpeg. How can I overlay or merge two different qml layers & merge them into one, to save it into a png/jpeg ? Note: I am able to save a…
TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159
1
2 3 4 5 6