Quantcast
Channel: Active questions tagged qtquick2 - Stack Overflow
Browsing latest articles
Browse All 171 View Live
↧

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


How to access delegate properties in ListView using index

I want to access delegate properties in ListView. I've tried with contentItem but sometimes it's undefined.Here is my code:ListModel { id: modeldata ListElement{ name:"don" rank:1 } ListElement{...

View Article


How to make a 3D text in QML

Using Qt Creator 4.9.1 (based on Qt 5.12.3), I'm trying to make a simple text in 3D like "Hello 3D" by a QML project.I've searched much but unfortunately have not found a simple example for this...

View Article

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

How do I correctly use QtCharts in a Qt Quick project? (QML works in qmlscene...

I'm trying to use QtCharts (specifically ChartView, PieSeries, etc.) in a Qt Quick project using Qt 6.9 with MinGW on Windows.Everything works perfectly when I run the QML with qmlscene, but as soon as...

View Article


Change property of the QML singleton with C++

I'm implementing a simplified Ubuntu Touch-like palette (not per-element one).There is a GlobalPaletteSetting singleton:pragma Singletonimport QtQuick 2.5QtObject { property Palette current:...

View Article

Can QObject be made callable from JavaSript?

Is it possible to make QObject callable from JavaSript?What I mean is to register QObject derived class instance like this:QObject* obj = new MyObject();QJSValue js_value =...

View Article

How to make QtQuick2.0 application window not resizable?

I have a QtQuick2.0/QtQuick2.1 application with following default codes on main.cpp: int main(int argc, char *argv[]){ QGuiApplication app(argc, argv); QtQuick2ApplicationViewer viewer;...

View Article


Image may be NSFW.
Clik here to view.

QtQuick curve with rounded corners

I'm trying to create a catmull rom spline in QTQuick using a ShapePath component, however I'm a bit lost and don't know where to start. The following gif is the result that I'm looking for, that type...

View Article


Image may be NSFW.
Clik here to view.

Flow layout with centered content

I have a row with items which should stack when the window width gets too small for displaying all items in a row, as shown in the following sketch:The Flow component stacks the items but they are not...

View Article

ListView delegate height animation

I have a ListView with a SwipeDelegate as delegate. It's contentItem consists of a ColumnLayout with two RowLayouts inside. Now I want the second RowLayout to unfold, if I click the delegate. This...

View Article

Dont close Dialog onAccepted

I have a simple QML Dialog. On the footer-area I am using a DialogButtonBox to have some default buttons like "Cancel", "Yes", "Yes to all", etc. I want the dialog to stay open an not close, if I press...

View Article

module "QtQuick.Dialogs" version 1.3 is not installed

I'm trying to import QtQuick.Dialogs version 1.3 in a code that runs without any issue with version 1.2. However on runtime I get the following errormodule "QtQuick.Dialogs" version 1.3 is not...

View Article


Qt Quick 6.9.2 on Android 15 - status bar text invisible in Light mode (works...

I have a minimal Qt Quick app on Android 15 (Qt 6.9.2) where the system status bar text/icons become invisible in Light mode (white on white). In Dark mode it’s fine.import QtQuickimport...

View Article

Qt Quick 6.9+ ContextMenu on Android - does it work?

If the documentation says:The ContextMenu attached type provides a way to open a context menu in a platform-appropriate manner,then why doesn’t this work?import QtQuickimport QtQuick.Windowimport...

View Article


Qt QML on VS Code complains about having correct corresponding revisions

The Qt Qml extension on VS Code keeps reporting:/usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick.2/plugins.qmltypes:(row):(column): Meta object revision and export version differ.Revision (x) corresponds to...

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


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

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

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

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


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


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

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

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


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

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

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 [time,value] control points[[t0,y0], ...,...

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



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
Browsing latest articles
Browse All 171 View Live


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