Questions tagged [qquickwidget]

QQuickWidget is a class from the Qt Toolkit which provides a widget for displaying a Qt Quick user interface. This is a convenience wrapper for QQuickWindow which will automatically load and display a QML scene when given the URL of the main source file.

Documentation can be found here (Qt5).

41 questions
9
votes
1 answer

How to embed a QML view into a native window

I'm having a problem trying to insert a QML view into a native OSX window. I know it's possible, but I don't know what I'm doing wrong. Basically, my goal is, given a native NSView* to then embed a QML based widget. The problem is that I get it to…
bitwise
  • 541
  • 6
  • 16
8
votes
1 answer

QQuickWidget and C++ interaction

I am experiencing with the new QQuickWidget. How can I interact between the QQuickWidget and C++? C++ QQuickWidget *view = new QQuickWidget(); view->setSource(QUrl::fromLocalFile("myqml.qml")); view->setProperty("test",…
Niklas
  • 23,674
  • 33
  • 131
  • 170
4
votes
1 answer

Run QtVirtualKeyboard using QQuickWidget

I am trying to make the QtVirtualKeyboard example work with QQuickWidget instead of QQuickView. For QuickView, I use the following main.cpp code, which works fine for me: #include #include #include int…
pvb
  • 41
  • 3
4
votes
1 answer

Qt Unable to move target to thread

I'm facing a strange bug in my Qt 5.7 (on Windows 10) application and the usual culprits for this kind of behaviour are nowhere to be found: Object that is moved has a parent - most certainly not the case Attempting to pull object to thread instead…
rbaleksandar
  • 8,713
  • 7
  • 76
  • 161
4
votes
4 answers

Drawing Simple Bar Charts in QML

Using Qt/C++ for a normal widget application, and the QQuickWidget with QML, how would I draw a simple bar chart like the following? I guess this question goes back to how the QML would be composed.
Volomike
  • 23,743
  • 21
  • 113
  • 209
3
votes
1 answer

Why using QQuickWindow::grabWindow() causes a window to turn into an image?

I have a QQuickWidget and want to grab a screenshot using QQuickWindow::grabWindow(). However when I do that the QQuickWindow becomes an image and is not responsive. Below is a minimal reproducible code: The bug is reproducible in Qt5.13 to Qt5.15.1…
SkySoft
  • 133
  • 7
2
votes
1 answer

Show QQuickWidget inside QGraphicsScene

I was upgrading some old code that was working fine to display my qml files inside a QGraphicsScene, but I was using the QDeclarativeView + QGraphicsProxyWidget method, so I converted to the new QT 6.5 / qtquick 2 format using QQuickWidget. OLD CODE…
2
votes
1 answer

Qt Virtual Keyboard in QQuickWidget

It is possible to show Virtual Keyboard in QQuickWidget or in QWidget? I have QWidget application and I need to have better control where VirtualKeyboard is shown. Today I spend all my day to find a solution, unfortunately without success.
Karlos
  • 23
  • 4
2
votes
1 answer

Embedding a QQuickWidget in a Layout (or in a QWidget) in Python

I use Python and Pyside2, I try to insert a QQuickWidget inside a Qwidget or inside a Layout but I haven't find a solution. I try with this code: view = QQuickWidget() view.setSource(QUrl.fromLocalFile("main.qml")) but QQuickWidget start in another…
Skyfox
  • 35
  • 1
  • 7
2
votes
2 answers

Unable to make QQuickWidget background transparent without break stacking order

I have a problem making the QQuickWidget background transparent. I want to place a QQuickWidget underneath a QWidget. The QQuickWidget uses a source qml file. When I worked with Qt 4.8, I used QDeclarativeView. Porting from Qt 4 to Qt 5,…
2
votes
1 answer

Black rectangle instead QQuickWidget (specific usecase). OpenGL problems

we use QT version 5.6 We have c++ application on Qt Widgets. In some plugin (created with Q_PLUGIN_METADATA and Q_INTERFACES) of this application we use QML: in some Widget we create QQuickWidget QQuickWidget* quickWidget = new…
2
votes
2 answers

QQuickWidget grab image

I am saving an image of a QQuickWidget with several QML children but all I have is a blank image. C++ side: QQuickWidget* content.. content->setSource(QUrl("qml:/main.qml")); QPixmap *pm =…
1
vote
1 answer

QQuickWidget: grabToImage: item's window is not visible

I'm having a problem when I try to use Item::grabToImage() qml method. No matter which item I point to, it always says the following error: grabToImage: item's window is not visible I tried using the root/toplevel Item named rect too, but it didnt…
1
vote
1 answer

How to add QML map to QGraphicscene?

The app have QGraphicscene(mpscene) with QGraphicsView(mpGraphicsView) i am trying to add qml map object to QGraphicscene(mpscene) But map view come separately like popup window. How can i add this map to QGraphicscene(mpscene)? Following are the…
Sagar A W
  • 338
  • 1
  • 12
1
vote
1 answer

QML Image source is not updated while mouse is pressed

I have ImageButton.qml which should change image when user holds the button. import QtQuick 2.0 Image { id: svg property string idleImage property string hoverImage signal clicked state: "idle" source: state === "idle" ?…
Semyon Tikhonenko
  • 3,872
  • 6
  • 36
  • 61
1
2 3