Improving QML code readability with singleton

This article explains how to take advantage of the singleton pattern in QML, to develope a clean and a structured utility class. The singleton pattern is a software design pattern that ensures a class has one instance, providing a global point of access to it. Due to its global access, it is one of the most controversial pattern, and can lead to design problems if used incorrectly. Advantages: it is initialized only when it’s requested for the first time it can simplify code by making easier to access shared resources it can improve performance by avoiding the need to create multiple instances of a class Disadvantages:...

August 24, 2023 · 4 min

Qt QML Live Reload

One of the most important and underestimated tools when developing QML apps, is QML live: QML Live is a local and remote Qt Quick live reloading system. It allows you to change your QML user interface source code and view the result in realtime. – Qt Documentation This tool can save countless hours of development when prototyping an application, because it simply reloads the edited files without the need of recompiling them....

January 13, 2023 · 3 min
https://github.com/develtar/qt-pdf-viewer-library

Qt PDF Viewer Library

The qt-pdf-viewer-library is a qml wrapper of pdf.js library which allows you to render PDF files in a WebView. This library also works for Android devices, and it uses WebSocketServer, WebSocketTransport and WebChannel to exchange data between qml and the browser environment. For more info check the repository page: https://github.com/develtar/qt-pdf-viewer-library import it.ltdev.qt.qml.components 1.0 as LTDev ApplicationWindow { ... property int x: 12 LTDev.PdfView { id: pdfView anchors.fill: parent onViewerLoaded: { // Load pdf only when viewer is ready pdfView....

January 9, 2023 · 1 min