With QtQuick.Controls 1.4, how to prevent focus change when mouse goes on...
I use a ListView and inside each Item of this ListView, I have a ComboBox or a SpinBox.My problem is that when I want to scroll my ListView, if my mouse goes on a ComboBox or a SpinBox, the focus will...
View ArticleLoading QQmlExtensionPlugin via QPluginLoader triggers exception
Context:I am currently working on a qmlextensionplugin with a c++ backend. The plugin manages a QList and instantiates for each entry a qml visualisation. I was already able to make the list fully...
View ArticleAutomatic row wrapping on elements in QML layout
Is there a QML layout or some configuration that will automatically wrap QML items to the next row if the width of the next element exceeds the width of the specified layout?When I use a QML...
View ArticleHow to apply opacity mask to a QML item?
The look and feel I'm trying to go for is to have a solid color button, and text on it like "Hello World" where the text is completely transparent, and the background shows through the button. In other...
View ArticleQt android 200+ gradle errors when building
I am trying to setup android in qt.After following this tutorial Qt tuturial every android and openSSL settings are ok. Creating and launching emulator also works but when i try to build any project (i...
View ArticleDynamically change QML Theme at runtime on MouseClick
I have Theme1.js which has the property variables related to Theme 1 styling, Similarly like this I have for Theme 2, Theme2.jsNow in main.qml, If I click on the MouseArea, The Theme should toggle...
View ArticleHow to import JS module (.mjs) to QML
I followed the example provided in the docs: // main.qmlimport QtQuick 2.0import "script.mjs" as MyScriptItem { width: 100; height: 100 MouseArea { anchors.fill: parent onClicked: {...
View ArticleWhat happens for a QQuickImageResponse emitting the finished signal too early?
In Qt6 Quick, using QQuickAsyncImageProvider is the recommended way to support multi-threaded asynchronous image loading, which involves implementing the requestImageResponse method to return a...
View ArticleQml: platform independent way for Monospace/Normal font
Is there a way to switch the font.family between "normal" and "monospace" in Qml in a platform independent way?Label { font.family: "Monospace"}At the moment I set the font for each platform...
View ArticleCombining Alternating Row Colors with a Smooth Highlight Rectangle in QML...
I am currently struggling to combine two seemingly simple concepts: alternating row colors and a smooth moving highlight item in QML ListViews.Consider this simple example:import sysfrom PySide6.QtCore...
View ArticleHow to change the colour of a row in QML TableView in QT6? I couldn't find...
TableView { id: testTable rowSpacing: 0 columnSpacing: 8 clip: true anchors.topMargin: 2 boundsBehavior: Flickable.OvershootBounds columnWidthProvider: function(column) { if(column === 0) return 50;...
View ArticleQt Quick QML Flickable disable flicking and enable only scrolling
I have two Flickable inside a column and I want to scroll vertically first Flickable when user scrolls second Flickable. Rectangle { id: rootanchors.fill: parentFlickable { id: first anchors.left:...
View ArticleQtQuick - what is meant by "parent item"?
The following QML code:Window { id: window width: 450 height: 700 visible: true StackView { id: mainStack property Item itemTest: Item { id: itemTest ColumnLayout { id: mainLayout width:...
View ArticleNeed help creating a model view with a TreeView in QML [closed]
I am trying to create a QML Clothing application that uses an SQL database. What I am trying to do is have different clothing types like pants or shirts that when clicked open up each clothing item...
View ArticleQt.labs.plarform is not installed only in release mode
I am using FileDialog from Qt.labs.platform 1.1 on win 10 in Qt creator, compilator I use is Desktop Qt 5.15.2. MinGW 64 bit.In the debug mode is working everthing fine but when I change to release...
View ArticleHow to set background color of HorizontalHeaderView Qt QML Quick Controls 2...
How is the background color of a HorizontalHeaderView within a TableView to be set?My goal is a table where the heading has a dark background, and a bright text color.possible layout: I neither managed...
View ArticleSetting Text from QRC in QML TextArea
I have a Qt Quick QML file with a TextArea that I would like have display text from a QRC resource. Other controls with images have a source member that can be set to load directly from a QRC QURL (see...
View ArticleQt 5.12.9 Q_GADGET class not working properly
I have this classes:description_value_model.hpp#ifndef DESCRIPTION_VALUE_MODEL_HPP#define DESCRIPTION_VALUE_MODEL_HPP#include <QObject>#include <QVariant>class DescriptionValueModel{...
View ArticleHow to declare list property in QML
How do I declare a list property in QML (for use with Qt.labs.settings in my case):Settings { property list recentFiles: []}Does not work. I've tried many other options: list<string>, string[],...
View ArticleHow to access C++ enum from QML?
class StyleClass : public QObject {public: typedef enum { STYLE_RADIAL, STYLE_ENVELOPE, STYLE_FILLED } Style; Style m_style; //...};The .h file has the above code. How to access the above enum through...
View Article