qml

Prevent QML Property Bindings when QML object isn't visible?

谁说胖子不能爱 提交于 2021-02-07 06:53:15
问题 I'm working on a QML application that has a lot of property bindings: hundreds of objects are tracked and displayed in different forms like Qt3D/QCanvas. When I'm on a separate page of the application those property bindings for x/y locations and relative sizes are still happening. How can I stop them? I know I could bind the properties based on whether they're visual or not but that is a lot of unnecessary code: x: visible ? tracking.location(index).x : 0 I would have to wrap a ton of

QML WebEngineView flick content

梦想与她 提交于 2021-02-07 03:38:31
问题 I'm trying to make a simple web-browser for desktop with Ubuntu 14.04 using QML and WebEngineView component. The application will be working on devices with touchpad so it would be nice to make the content displayed inside WebEngineView flickable. I tried to do it this way, but it does not work: ... WebEngineView { id: webView url: "http://google.com" width: parent.width height: winternet.height-navigationBar.height-iStatusBar.height-iBackButton.height anchors.top: navigationBar.bottom

QML WebEngineView flick content

浪子不回头ぞ 提交于 2021-02-07 03:36:27
问题 I'm trying to make a simple web-browser for desktop with Ubuntu 14.04 using QML and WebEngineView component. The application will be working on devices with touchpad so it would be nice to make the content displayed inside WebEngineView flickable. I tried to do it this way, but it does not work: ... WebEngineView { id: webView url: "http://google.com" width: parent.width height: winternet.height-navigationBar.height-iStatusBar.height-iBackButton.height anchors.top: navigationBar.bottom

QML WebEngineView flick content

倖福魔咒の 提交于 2021-02-07 03:35:25
问题 I'm trying to make a simple web-browser for desktop with Ubuntu 14.04 using QML and WebEngineView component. The application will be working on devices with touchpad so it would be nice to make the content displayed inside WebEngineView flickable. I tried to do it this way, but it does not work: ... WebEngineView { id: webView url: "http://google.com" width: parent.width height: winternet.height-navigationBar.height-iStatusBar.height-iBackButton.height anchors.top: navigationBar.bottom

Using drag and drop with ListView to create an inventory UI

人走茶凉 提交于 2021-02-06 13:48:44
问题 I'd like to create an inventory UI for my game using ListView, where the items can be removed from the inventory by dragging and dropping them in the level. If an item was not dropped properly (still inside the inventory), it should be placed back where it was before the drag. I've got the following code, but I don't know how to achieve what I'm after, even after looking at the Drag and Drop example. import QtQuick 2.3 Rectangle { id: root width: 400 height: 400 ListView { id: listView width:

QML fit screen on all resolutions

不打扰是莪最后的温柔 提交于 2021-02-06 10:19:09
问题 Hi all I have problem with my QML code. I made mistake and I went to put certain size to elements and now I have problem when putting app on other devices. I will paste you my code where I have width and height so you can change it to show me how to work with dynamic resizeing. I need to say that I am calling qml file from qt with this code: QDeclarativeView *view= new QDeclarativeView; ui->setupUi(this); setCentralWidget(view); QDeclarativeContext *ctxt = view->rootContext(); ctxt-

QML fit screen on all resolutions

我的未来我决定 提交于 2021-02-06 10:17:08
问题 Hi all I have problem with my QML code. I made mistake and I went to put certain size to elements and now I have problem when putting app on other devices. I will paste you my code where I have width and height so you can change it to show me how to work with dynamic resizeing. I need to say that I am calling qml file from qt with this code: QDeclarativeView *view= new QDeclarativeView; ui->setupUi(this); setCentralWidget(view); QDeclarativeContext *ctxt = view->rootContext(); ctxt-

QML fit screen on all resolutions

孤者浪人 提交于 2021-02-06 10:16:18
问题 Hi all I have problem with my QML code. I made mistake and I went to put certain size to elements and now I have problem when putting app on other devices. I will paste you my code where I have width and height so you can change it to show me how to work with dynamic resizeing. I need to say that I am calling qml file from qt with this code: QDeclarativeView *view= new QDeclarativeView; ui->setupUi(this); setCentralWidget(view); QDeclarativeContext *ctxt = view->rootContext(); ctxt-

QML fit screen on all resolutions

柔情痞子 提交于 2021-02-06 10:16:09
问题 Hi all I have problem with my QML code. I made mistake and I went to put certain size to elements and now I have problem when putting app on other devices. I will paste you my code where I have width and height so you can change it to show me how to work with dynamic resizeing. I need to say that I am calling qml file from qt with this code: QDeclarativeView *view= new QDeclarativeView; ui->setupUi(this); setCentralWidget(view); QDeclarativeContext *ctxt = view->rootContext(); ctxt-

Video.play returns DirectShowPlayerService::doSetUrlSource: Unresolved error code 800c000d

可紊 提交于 2021-02-05 12:12:45
问题 Using Qt Version 5.4.2 Error code returned : DirectShowPlayerService::doSetUrlSource: Unresolved error code 800c000d A QML file has been written with the Video QML type as below. I have added the below in the project file (.pro) Qt+= multimedia Snippet of code as below in the QML file. Video { id: video width : 800 height : 600 source : "Video.mp4" MouseArea { anchors.fill: parent onClicked: { video.play(); } } focus: true Keys.onSpacePressed: video.playbackState == MediaPlayer.PlayingState ?