Quantcast
Channel: Active questions tagged qtquick2 - Stack Overflow
Browsing all 106 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

QML layout and padding working in Qt Design Studio but not Qt Creator with...

I have the following QML code:import QtQuickimport QtQuick.Windowimport QtQuick.Controlsimport QtQuick.LayoutsWindow { visible: true width: 300 height: 300 title: "Padding test" Frame {...

View Article


Swipeable button in QML

i wanna create a component which can slide a rectangle from left to right to simulate ON or OFF like a iOS left-to-right button to shutdown phone (https://youtu.be/qEJ5PerUqFw?t=42 second 40 like...

View Article


How to add and use a resource in QML?

I want to use a QtQuick Image object in a simple Qt project, and include the image in the project. I have added the image to the resource file. I have used debugging to be sure that the resource exists...

View Article

PySide6 and QML error: qtquick2plugin.dll: The specified module could not be...

I use python version 3.11.1 in a virtual env and used pip install pyside6 to install pyside6The full error I get is:QQmlApplicationEngine failed to load...

View Article

How to show Opencv camera feed in a Qml application?

I'm trying to show opencv processed camera feed inside and Image object in Qml application.The feed page is a separate page loaded with a Loader object to the main page when a button is pressed, the...

View Article


Image may be NSFW.
Clik here to view.

Why can I not make a QML RowLayout fill a ColumnLayout's width?

I want to lay out a RowLayout's items to be evenly spaced inside its container. But somehow, setting the RowLayout's Layout.fillWidth property does not have any effect when its parent is a...

View Article

Settings and default ApplicationWindow position

When user first time run my app, I would like to center main window on the screen by default. When he run it again, I want to restore his last position. I have this code:ApplicationWindow { id:...

View Article

Set maximum width for RowLayout

I'm trying to build a custom control where I can place other controls (Buttons, Sliders, edit fields, etc.) grouped together.The control should appear on the right side of the window and should have a...

View Article


Get TableView cell content

I would like to read specific data from a database, visualise the data in a table and write everything to another database.But, I have some problems with reading the table. How do I get access to...

View Article


QML TestCase not triggering with my component: What am I missing?

I created a component and decided to immediately add a TestCase to it to check when the application is launched, but the application does not start and even more so does not run.My file is called...

View Article

How to disable dragging content that fits in ScrollView

The content of a QML ScrollView can be dragged using the mouse or touch gestures. The same is true for the content of ListViews, at least in the example I have. And it is even possible to do so when...

View Article

How to access nested Repeaters

I want to fill the colours in the following rectangles created through Repeaters, dynamically.I am not able to access the bottom Repeater at all.How should I access "all" the rectangles here?Row{...

View Article

QML Repeater parentness

Let's say I have 2 types of custom elements — Parent and Child.And there can be more than one Parent in the scene.A simple scene looks like this:Parent { Child { id: child1 } Child { id: child2 }}After...

View Article


How to use nested Repeaters in QML

Row { Rectangle { width: 10; height: 20; color: "red" } Repeater { model: 10 Rectangle { width: 20; height: 20; radius: 10; color: "green" } } Rectangle { width: 10; height: 20; color: "blue" }}Here, I...

View Article

Limit the number of items displayed in ListView

I have a ListViewListModel with 10 ListElements, I want the ListView to display the first ListElement from the model.Is there a way to limit the number of ListElement items that are displayed, or...

View Article


Deactivate QML Item to avoid overlapping of action areas

How to proceed if one has stacked elements with stacked action areas to make sure that you acton what you see and not on underlying elements?I'm following a tutorial on Qt Quick 2.0 programming for...

View Article

Image may be NSFW.
Clik here to view.

Qt quick controls ScrollView

I didn't found any good resource how to use this component and it still fails layout of my app (check that right properties inspector). What i did wrong?without ScrollViewwith ScrollViewscroll that...

View Article


QtQuick: dragging MapQuickItem on a Map

I want to achieve self-draggable MapQuickItem. Simple example:MapQuickItem { id: markerItem sourceItem: Rectangle { id: sourceRect color: "red" width: 20 height: 20 x: 0 y: 0 MouseArea { drag.target:...

View Article

Change cursor color in TextField

How do I change the cursor color and probably width in QML TextField element?Let's say we have the following:import QtQuick 2.12import QtQuick.Controls 2.12TextField { id: control placeholderText:...

View Article

TableViewColumn is not a type [duplicate]

I get an error when trying to create a table.I realised this when I needed a table in the code I wrote. Everything works without error, except TableViewColumn. I tried separating it from the other code...

View Article
Browsing all 106 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>