qml

QQuickView - resize the content without delay / lag

孤者浪人 提交于 2021-02-20 19:12:11
问题 An image often being the easiest way to explain something, here is a little screengrab of the problem I'm having: If you look at the right side of the window, you can see that the content is resized with a visible lag / delay. It's a problem that happens in quite a lot of applications, but I was wondering if there is a way to fix this in a Qt application using QQuickView and QML content. Basically my application is created like this: QQuickView view; view.resize(400, 200); view.setResizeMode

QQuickView - resize the content without delay / lag

丶灬走出姿态 提交于 2021-02-20 19:11:21
问题 An image often being the easiest way to explain something, here is a little screengrab of the problem I'm having: If you look at the right side of the window, you can see that the content is resized with a visible lag / delay. It's a problem that happens in quite a lot of applications, but I was wondering if there is a way to fix this in a Qt application using QQuickView and QML content. Basically my application is created like this: QQuickView view; view.resize(400, 200); view.setResizeMode

QAbstractVideoSurface example

这一生的挚爱 提交于 2021-02-19 01:46:05
问题 I'm trying to make myself a QML Camera item which has more functions, and also provide a source to the VideoOutput element. Such as this: VideoOutput{ source:mycamera } MyCustomCamera{ id:mycamera } in the document it says If you are extending your own C++ classes to interoperate with VideoOutput, you can either provide a QObject based class with a mediaObject property that exposes a QMediaObject derived class that has a QVideoRendererControl available, or you can provide a QObject based

Setting the Style in qml Qt

心不动则不痛 提交于 2021-02-18 18:12:54
问题 I want to set the Style for my elements in qml. For that, I want to use a style like Material Style. Using the example which can be found under: https://doc.qt.io/qt-5/qtquickcontrols2-material.html import QtQuick 2.12 import QtQuick.Controls 2.12 import QtQuick.Controls.Material 2.12 ApplicationWindow { visible: true Material.theme: Material.Dark Material.accent: Material.Purple Column { anchors.centerIn: parent RadioButton { text: qsTr("Small") } RadioButton { text: qsTr("Medium"); checked:

Setting the Style in qml Qt

痴心易碎 提交于 2021-02-18 18:12:15
问题 I want to set the Style for my elements in qml. For that, I want to use a style like Material Style. Using the example which can be found under: https://doc.qt.io/qt-5/qtquickcontrols2-material.html import QtQuick 2.12 import QtQuick.Controls 2.12 import QtQuick.Controls.Material 2.12 ApplicationWindow { visible: true Material.theme: Material.Dark Material.accent: Material.Purple Column { anchors.centerIn: parent RadioButton { text: qsTr("Small") } RadioButton { text: qsTr("Medium"); checked:

Setting the Style in qml Qt

╄→гoц情女王★ 提交于 2021-02-18 18:10:11
问题 I want to set the Style for my elements in qml. For that, I want to use a style like Material Style. Using the example which can be found under: https://doc.qt.io/qt-5/qtquickcontrols2-material.html import QtQuick 2.12 import QtQuick.Controls 2.12 import QtQuick.Controls.Material 2.12 ApplicationWindow { visible: true Material.theme: Material.Dark Material.accent: Material.Purple Column { anchors.centerIn: parent RadioButton { text: qsTr("Small") } RadioButton { text: qsTr("Medium"); checked:

Drag and drop in QML [closed]

[亡魂溺海] 提交于 2021-02-18 18:06:00
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 months ago . Improve this question How can I develop drag and drop functionality in QML? I want to drag and drop one image to another. 回答1: At this point in time, you will probably need to use C++, especially if you want to accept drops from outside the QML application (e.g. the user drags a

Drag and drop in QML [closed]

删除回忆录丶 提交于 2021-02-18 18:05:50
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 months ago . Improve this question How can I develop drag and drop functionality in QML? I want to drag and drop one image to another. 回答1: At this point in time, you will probably need to use C++, especially if you want to accept drops from outside the QML application (e.g. the user drags a

How to run OpenStreetMap offline in QML (Qt)

怎甘沉沦 提交于 2021-02-18 11:42:19
问题 I am using QML on Qt to display OpenStreetMap (using the osm plugin), which requires internet connection. Is there a way that I can do the same but running it offline? For example, running my own tile server (but how easy is that to do)? Or using a library that will let me do it quite quickly. By the way I am running my program on Ubuntu. Any help on how to do that and especially if someone can provide the steps to be done would be appreciated. Thank you. 回答1: I have managed to display

QML Charts causes crash on startup

雨燕双飞 提交于 2021-02-17 05:09:32
问题 I'm trying to make an application that uses QML QCharts to visualize data. The program is crashing at startup before a window even appears. I tried on both macOS and Windows 10 with the same results. I have included a minimally working example below. main.py : import sys from PySide2.QtGui import QGuiApplication from PySide2.QtQml import QQmlApplicationEngine from PySide2.QtCore import QUrl import qml_rc if __name__ == "__main__": app = QGuiApplication(sys.argv) engine = QQmlApplicationEngine