Re: [Interest] How to fix qml unqualified access warning for setContextProperty

2024-10-24 Thread Federico Ferri
Have you considered the option of making your "controller" object a QML Singleton? That should help with type checking. On Thu, 24 Oct 2024 at 12:06, Nuno Santos via Interest < interest@qt-project.org> wrote: > Hi, > > In my applications I usually register a main controller for the whole > applic

[Interest] Best software engineering practices for QML

2024-09-24 Thread Federico Ferri
Greetings, during last years of development with QML I always wondered how to solve certain software engineering problems. First, defining private properties: I have seen sometimes doing: Item { property int publicProp: 40 + state.privateProp QtObject { id: state property

[Interest] getting type information of properties in QML

2024-07-16 Thread Federico Ferri
Is there any way to get type information about types of properties defined in a QML Component? e.g. Item { property color c property vector3d v property int i Component.onCompleted: { getPropertyType(c) === 'color' getPropertyType(v) === 'vector3d' getProp

Re: [Interest] Qt Quick and interactive components with moving MouseAreas

2024-04-01 Thread Federico Ferri
On Fri, 29 Mar 2024 at 18:15, Federico Ferri wrote: > This is how I did it: > https://github.com/fferri/qt-quick-events-timeline/tree/d98b33830291ce9b85670b6bcc41952d513e610b > and if it looks bad to you, consider I tried to solve this or a very > similar problem another 2-3 times i

[Interest] Qt Quick and interactive components with moving MouseAreas

2024-03-29 Thread Federico Ferri
putes the adjustments. It may look extremely hacky and low-level, but it is the only way I could achieve smooth resizing without the issues mentioned above. Which makes me wonder if I overlooked something way more obvious to achieve the same result Thanks for any feed

[Interest] FileDialog crash on macOS arm64

2024-02-26 Thread Federico Ferri
critical on Qt Quick, where the non-native dialog is somewhat broken and not usable. Anyone have this issue? Cheers, Federico Ferri ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest

Re: [Interest] running pyqt app event loop in secondary thread, using (Py)Qt6.5

2023-09-22 Thread Federico Ferri
On Fri, 22 Sept 2023 at 18:36, Stefan Seefeld wrote: > Hello, > > I'm trying to establish a Python test methodology whereby a QApplication > is launched (and its event loop executed) in a secondary thread, while the > primary thread performs some "test scenario". > QApplication.exec must be call

Re: [Interest] Why Repeater.count increases before the item is actually created?

2022-06-30 Thread Federico Ferri
y states, some of which result in a JS error if we don't add those redundant null-checks. -- Federico Ferri ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest

[Interest] Why Repeater.count increases before the item is actually created?

2022-06-30 Thread Federico Ferri
particularly declarative ^.^...) Is there a "declarative" reason for behaving the way it behaves now? Cheers, Federico Ferri ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest

Re: [Interest] Quick Item visibility test / hit test... or synthesize press event

2022-06-22 Thread Federico Ferri
gt; https://bugreports.qt.io/browse/QTBUG-23745 > > https://bugreports.qt.io/browse/QTBUG-83647 > > > > > > *From: *Interest on behalf of Federico > Ferri > *Date: *Wednesday, 22 June 2022 at 05:26 > *To: *Qt Project MailingList > *Subject: *Re: [Interest] Quic

Re: [Interest] Quick Item visibility test / hit test... or synthesize press event

2022-06-21 Thread Federico Ferri
return result } It only handles visibility and clipping. If there is a better way or I overlooked some QtQuick aspect, please let me know. Cheers, Federico Ferri On Tue, Jun 21, 2022 at 8:54 PM Federico Ferri wrote: > Is it possible to find what is the topmost visible item given

[Interest] Quick Item visibility test / hit test... or synthesize press event

2022-06-21 Thread Federico Ferri
Is it possible to find what is the topmost visible item given a pixel coordinate? e.g. in this simplified example: Rectangle { x: 20; y: 20; width: 20; height: 20; color: 'red'; Rectangle { x: 5; y: 10; width: 5; height: 5; color: 'green'; } } it would be the red Rectangle fo

[Interest] QtMultimedia not installed by the installer/maintenance tool

2022-06-17 Thread Federico Ferri
s: find_package(Qt6 6.2 COMPONENTS Quick Network Multimedia REQUIRED) [...] target_link_libraries(QNetPd PRIVATE Qt6::Quick Qt6::Network Qt6::Multimedia) If I remove the Multimedia component and its usage from my project, I can build/run my project fine. Is it a bug? Cheers, Fede

[Interest] How to implement draggables with multiple hot spots

2021-09-21 Thread Federico Ferri
n bottom, and other types... like a jigsaw puzzle) Any ideas? I asked this question also on SO, where you can find complete code for my implementation: https://stackoverflow.com/questions/69175796/draggable-item-with-multiple-hotspots Cheers, Federico Ferri

Re: [Interest] QThreadPool wait until all queued threads are finished

2021-08-19 Thread Federico Ferri
Why don't you use a QSemaphore? You instantiate it with n=0 (the default constructor). Call sem.acquire(xxx.size()) to wait for all tasks to complete, amnd call sem.release(1) after each task completes. Best regards, Federico Ferri On Tue, Aug 17, 2021 at 9:03 PM Scott Bloom wrote: >

Re: [Interest] [Qt3d] Rendering 3D object with 2D coordinates

2021-03-15 Thread Federico Ferri
The 3D coordinates are *world coordinates*, and their units is whatever you like, e.g. you can have a cube of size 0.1, 1, or 100, and with appropriate camera settings, it will appear the same onto the window/device. 2D *window coordinates* are another thing. For going to world coords to window c

Re: [Interest] How to populate ChartView CandlestickSeries from JS?

2021-02-19 Thread Federico Ferri
Federico Ferri wrote: > I need to populate a CandlestickSeries inside a ChartView: > > ChartView { > id: chartView > width: 600 > height: 400 > CandlestickSeries { > id: series >

[Interest] How to populate ChartView CandlestickSeries from JS?

2021-01-29 Thread Federico Ferri
I need to populate a CandlestickSeries inside a ChartView: ChartView { id: chartView width: 600 height: 400 CandlestickSeries { id: series name: "test" } } tried the following code, but not

Re: [Interest] How to expose a ‘index’ property to a delegate?

2020-11-23 Thread Federico Ferri
I pushed these files and the QtC project to https://github.com/fferri/qt3d-thing On 23 November 2020 at 17:49:17, Federico Ferri (federico.ferri...@gmail.com) wrote: Following your advice, I changed Array.qml to the following: (most notably: added the repeater.model property alias) […] Cheers

Re: [Interest] How to expose a ‘index’ property to a delegate?

2020-11-23 Thread Federico Ferri
PhongMaterial { diffuse: Qt.rgba(model.index / 10, 0.5, 0.5, 1.0) shininess: 75 } ] } } (all items have the same Qt.rgba(1.0, 0.5, 0.5, 1) color) Also changing the model reference (in PhongMaterial) to root.model.index gives the same result. Cheers, Fe

[Interest] How to expose a ‘index’ property to a delegate?

2020-11-23 Thread Federico Ferri
tent: size; zExtent: size }, PhongMaterial { diffuse: Qt.rgba(index / 10, 0.5, 0.5, 1.0) shininess: 75 } ] } } but of course in this example it is using a non-existent ‘index’ in the PhongMaterial.diffuse bindi

Re: [Interest] QLineEdit placeholder text Qt 5.6.3

2020-09-14 Thread Federico Ferri
https://stackoverflow.com/questions/50423658/qlineedit-paint-a-different-text-than-the-actual-text-placeholder-with-text-n/50425331#50425331 On 13 September 2020 at 14:00:02, Ramakanth Kesireddy (rama.k...@gmail.com) wrote: Hi, Am using Qt 5.6.3 widgets on embedded Linux. To display placeholde

Re: [Interest] Models and aborting structural changes

2020-06-03 Thread Federico Ferri
the data. Upon each data change, version is incremented. If the client submits an edit whose version number is less than the actual version number (which means the client hasn’t observed all changes yet) simply discard that edit. Cheers, Federico Ferri ___ I

Re: [Interest] Models and aborting structural changes

2020-06-03 Thread Federico Ferri
ng methods and then endInsertRows(). Sorry if I did not understood some part of your problem. Cheers, Federico Ferri ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest

Re: [Interest] Writing custom Qt Widgets is overly complicated

2020-04-28 Thread Federico Ferri
be you can copy and adapt the implementation to Qt Widgets. Cheers, Federico Ferri ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest

Re: [Interest] QML engine, C++ model in secondary thread, signal lag, and infinite change loop

2020-03-17 Thread Federico Ferri
On 17 March 2020 at 12:03:59, Mitch Curtis (mitch.cur...@qt.io) wrote: Hi. > -Original Message- > From: Interest On Behalf Of Federico > Ferri > Sent: Tuesday, 17 March 2020 11:30 AM > To: interestqt-project.org > Subject: [Interest] QML engine, C++ model in second

[Interest] QML engine, C++ model in secondary thread, signal lag, and infinite change loop

2020-03-17 Thread Federico Ferri
utions to it. Best regards, Federico Ferri ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest

Re: [Interest] Accessing vertex data of primitive shapes (cuboid, sphere, …)

2020-03-10 Thread Federico Ferri
Nevermind, I was keeping the previous result of Qt3DRender::QBuffer::data() which was invalid. Calling buf->data() again after setData/setSyncData gave thew correct result. On 9 March 2020 at 13:35:40, Federico Ferri (federico.ferri...@gmail.com) wrote: I added your fix (just after the l

Re: [Interest] Accessing vertex data of primitive shapes (cuboid, sphere, …)

2020-03-09 Thread Federico Ferri
*buf = attribute->buffer(); if (buf) { if (buf->data().isEmpty()) buf->setData(buf->dataGenerator()->operator()()); buf->setSyncData(true); buf->setAccessType(Qt3DRender::QBuffer::AccessType::ReadWrite); }

[Interest] Accessing vertex data of primitive shapes (cuboid, sphere, …)

2020-03-09 Thread Federico Ferri
I’m trying to access vertex data of QGeometry objects for computing the bounding box of the object. This works fine for QMesh, but for QCuboidMesh, QSphereMesh, etc… vertex data seems invalid. Is there some method to call to make vertex data actual? This is my code: QVector entityBoundingBox(Qt3D

[Interest] Qt3D ObjectPicker doesn't work for a dynamically created entity if there isn't already another entity with ObjectPicker

2020-03-03 Thread Federico Ferri
I’m dynamically creating a Qt3D entity via C++ if(!rootEntity_) return; auto cuboidEntity = new Qt3DCore::QEntity(rootEntity_); auto mat = new Qt3DExtras::QPhongMaterial(cuboidEntity); mat->setDiffuse(QColor(217, 217, 255)); auto t = new Qt3DCore::QTransform(cuboidEntity);

Re: [Interest] Problems with layouting with QML Control 2 Qt 5.12

2019-02-01 Thread Federico Ferri
On 1 February 2019 at 11:14:01, Roman Wüger (roman.wue...@gmx.at) wrote: Hello, i noticed this in every ui file I „design“ in Qt Creator. To simplify the problem: I have a lot of labels and text input fields next to the labels. Under Windows in Qt Creator, everything looks perfect, but then whe

Re: [Interest] QML: Property 'update' of object QPaintedTextureImage is not a function

2019-02-01 Thread Federico Ferri
ated in C++) at https://github.com/fferri/Qt3DOpenCV-test On 31 January 2019 at 23:50:40, Federico Ferri (federico.ferri...@gmail.com) wrote: Hi, I’m trying to display a stream of images from a capture device in Qt3D (via a texture). So I subclassed QPaintedTextureImage overriding paint()

[Interest] QML: Property 'update' of object QPaintedTextureImage is not a function

2019-02-01 Thread Federico Ferri
Hi, I’m trying to display a stream of images from a capture device in Qt3D (via a texture). So I subclassed QPaintedTextureImage overriding paint(). According to documentation of QPaintedTextureImage, each time update() is called, the paint() function is invoked and the resulting image is upload

[Interest] QML: Property 'update' of object QPaintedTextureImage is not a function

2019-02-01 Thread Federico Ferri
Hi, I’m trying to display a stream of images from a capture device in Qt3D (via a texture). So I subclassed QPaintedTextureImage overriding paint(). According to documentation of QPaintedTextureImage, each time update() is called, the paint() function is invoked and the resulting image is upload