Quantcast
Channel: Active questions tagged qtquick2 - Stack Overflow
Browsing index pages (175 articles)

Collapsible Panel in QML

I am trying to create a collapsible panel in QML. The issue that I am facing is when the rectangle's (id: settingsBox) height is 0: in this case I can still see the contained Label (id: texter). I want...

View Article


Create a ListModel programatically

I want to collect the output from a command into a ListModel: Row { id: cpu_usage_widget anchors.right: tray.left padding: 3 spacing: 4 Repeater { model: cpu_usage.data Rectangle { width: 12 height: 24...

View Article


Strange binding behavior when using binding on array's element

I have an Item with a property. This property contains an array of JavaScript objects which in turn contain other properties.When I set binding for one of object's properties to some variable and its...

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

Image may be NSFW.
Clik here to view.

Can we do Easing.BezierSpline animation when initial and final values are...

In a QML script, I want to animate a real-valued property yaccording to a cubic bezier spline in time,value space.The spline is given as an input sequence of 1+3*n [time,value] control points[[t0,y0],...

View Article


Protecting QML source code from plagiarism

The goal is to come up with a way to protect your QML code from plagiarism. It is a problem, since the way QML was designed and implemented seems to be inexplicably unprotected in this regard. The only...

View Article

How to align QML components in a delegate

I want to align my list of phone numbers with one field ("name") on the left side and another field ("phone") on the right side. However when trying to bind anchor properties inside the delegate, it...

View Article

Image may be NSFW.
Clik here to view.

Can "Behavior on" syntax be used with a custom Animation type?

I would like to learn how to implement custom drop-in replacements for SpringAnimation and SmoothedAnimation, that can be substituted into the "Behavior on" statements in any of the simple examples of...

View Article


How to bind an optional property in QML?

I'm developping a QtQuick Custom Style (according too this documentation), and I'm facing a problem.My Button template implementation expose an additionnal user propertyMyCustomStyle/Button.qmlimport...

View Article


Using c++ enum in QML as string

What I would like to do is use the below enum in c++:class MyClass : public QQuickItem { Q_OBJECT Q_PROPERTY(MyEnum enumValue READ getEnumValue)public: enum MyEnum{ MyEnumElement = 0 };...

View Article

Visual Studio + CMake + Qt Quick: how to debug QML files?

My project is being built using CMake. Visual Studio can open CMakeLists.txt directly, without vcxproj generation, this is very convenient.My project also uses Qt and QML. If you open vcxproj, then the...

View Article

Surprising mouse behaviour when TableView overlapping

Given this code:import QtQuickimport Qt.labs.qmlmodelsWindow { width: 640; height: 480; visible: true; color: "silver" FocusScope { id: bottomScope anchors.centerIn: parent...

View Article

QML how to animate every change of a property? (only the last change...

I have to make a mechanical counter controlled from C++. I did it from an image which contains the digits (0,1,2,3,4,5,6,7,8,9,0). Only one digit is visible at a time. I want this counter to change...

View Article


CMake: QML warnings on Ubuntu 25.04: "link target it defines...

I'm trying to build Noteahead MIDI tracker (https://github.com/juzzlin/Noteahead) on Ubuntu 25.04 and getting a lot of CMake warnings like these:CMake Warning at...

View Article

Qt6 - Clipping a child rectangle to a parent rectangle with a radius using...

I am trying to make the first image, look like the second image(sorry I can't post images yet)unclipped rectangleclipped rectangleThe goal to is to clip the green child rect to match the inside radius...

View Article


How to access Metadata from audio files in Qt

I am working on the simulation of MusicPlayer in Qt using QML,Here is my code to access the metadata from the .mp3 fileApplicationWindow { visible: true width: 640 height: 480 Audio { id:audio1...

View Article

Image may be NSFW.
Clik here to view.

Qt Quick QML: SafeArea not working on Android devices

I am trying to create a Qt Quick mobile application using SafeArea to restrict the location of contents on the screen. It works well on desktop, but when I run it on my mobile device the margins...

View Article


Image rounded corners in QML

To my surprise, the Image component has no radius property. I tried emulating the rounded corners by putting the image in a rounded Rectangle, but it does not clip the corners.Rectangle {...

View Article

Image may be NSFW.
Clik here to view.

Re-launch (not first launch) display problems and crashes on Android app...

I have developed a Qt Quick application for Windows and Android. The Windows version works perfectly and I have started to test it out on an Android device via USB Debugging.On the first launch of the...

View Article

QML Qvariant from custom class

I have my custom C++ class: Media.h:#ifndef MEDIA_H#define MEDIA_Hclass Media{public: explicit Media(); virtual ~Media(); void setAllMedia(QString id, QString type, QString media, QString...

View Article
Browsing index pages (175 articles)


Latest Images