Does QT supports run time dynamic UI generation and HTML rendering

873 Views Asked by At

I am trying to consider QT for embedded device UI development.

But I want to have UI library that supports UI generation at the run time, for example, UI lib should support creating UI screen depending on the configuration stored in the file, code will read this file and will create UI XML or user the lib APIs to create the UI at run time, is this supported in QT?

Also does QT supports rendering basic HTML pages on the embedded UI, does it supports WebView like widgets to render HTML pages?

2

There are 2 best solutions below

2
fghj On

UI lib should support creating UI screen depending on the configuration stored in the file, code will read this file and will create UI XML or user the lib APIs to create the UI at run time, is this supported in QT?

Yes, look at http://doc.qt.io/qt-4.8/quiloader.html

Also does QT supports rendering basic HTML pages on the embedded UI, does it supports WebView like widgets to render HTML pages?

They basic textview/textedit component support simple html, also there is part of qt named qt webkit, it is work around webkit/blink, to support complex html.

0
dtech On

But I want to have UI library that supports UI generation at the run time, for example, UI lib should support creating UI screen depending on the configuration stored in the file, code will read this file and will create UI XML or user the lib APIs to create the UI at run time, is this supported in QT?

QML is a markup language, offering cleaner and easier syntax than XML and integrates JavaScript. It works together with the QtQuick 2 API to create rich UI experience. It doesn't require compilation, can be easily generated, offers great graphics performance and can be created from a simple string. It is a more fullproof solution than using the QtWidget based .ui XML format since you can not only have UI markup, but behavior and logic in it as well. Also, it is network transparent - you can have the QML file or associated data remotely on a network or the internet and use it directly.

It also comes with a ready to use WebView component.