Qt Quick and Qt Widgets interchangeably

The need for new application frontend comes from the goal to get the application working on Android. Four observations have been made:

  1. Qt’s user interface guide, points at Qt Quick as the right choice for developing frontend for touch devices, like e.g. Android;

  2. The frontend of KMyMoneyNEXT is based on the Qt Widgets, and the switch to the Qt Quick is not a drop-in replacement;

  3. KTuberling uses Qt Widgets only, for running on Android. Although its frontend is usable, it may not be the same case for a complex KMyMoneyNEXT frontend due to insufficient scalability;

  4. KStars devised a separate part called KStarsLite, which purpose seems to be implementing desktop dialogs functionality in Qt Quick. Analysing two related dialogs: one Widget and one Quick version it can be seen, that they don’t match visually, but both maintain look and feel of their platform.


It has been decided to develop a storage manager in Qt Quick and Widgets, with the ability to use them interchangeably. A system of class inheritance has been designed to reduce a maintenance work of the two frontends. An example class diagram is shown below for an explanation.

A class Open - Qt Widget and Open - Qt Quick provide frontends for opening certain type of storage. They share some code, so it has been put in the abstract Open class. As a result, both frontend classes contain the code specific to them only. That makes it feasible to extend the support by e.g. DOS frontend.

The frontend provided by Open - Qt Widget is:

  1. partial in a sense, that it provides e.g. literally single text field;
  2. specific to a given plugin;
  3. specific to a given storage type;
  4. specific to a given frontend type.

The manager manages these frontends, and present them to the user in a consistent way. For that, it uses interface Dialog part, which is a way of standardizing its partial frontends.

Working principle for the rest part of manager’s frontend is analogical, and thus not shown here.


The result of developing the storage manager with Qt Widgets and Qt Quick as frontend is:

  1. 28 dialog combinations for opening and saving storages, from which 6 are unique;
  2. 9 dialog combinations for entering credentials, from which 5 are unique;
  3. 12 message box combinations for the issues processor, featured here.

The user can choose between used frontend through plugin settings, as shown below. The changes are applied immediately, and without an application restart.

Two example dialogs in Qt Widgets (one the left), and Qt Quick (on the right) are shown below for comparison.

The same is done for message boxes.

It can be observed, that Qt Quick versions match the Qt Widgets versions visually, which may not be suitable for Android. They should be tested in that environment, and appropriate adjustments have to be made to the frontend, if needed.