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 ArticleHow 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 ArticleHow 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 ArticleCollapsible 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 ArticleHow 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 ArticleChange 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 ArticleCan 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 ArticleHow 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 ArticleQtQuick 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 ArticleFlow 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 ArticleListView 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 ArticleDont 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 Articlemodule "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 ArticleQt 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 ArticleQt 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 ArticleQt 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 ArticleQML 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 ArticleQt 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 ArticleHow 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 ArticleQt6 - 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 ArticleCMake: 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 ArticleQML 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 ArticleSurprising 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 ArticleVisual 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 ArticleUsing 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 ArticleHow 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 ArticleCan "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 ArticleCan 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 ArticleHow 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 ArticleProtecting 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