How to create ms-access as continuous subforms (widgets) in Qt?

I am thinking about porting my access application to Qt. I'm interested in learning how to make subforms, sub-standard widgets for presenting / editing / inserting data from a recordset in the simplest scrollable form without a datagrid. Sense I could put a button, label, combo, lineEdit ... anything, for each entry.

I like QTableView and delegates. I just don’t know if it can be modified to completely imitate the access subformat.

Sidequestion (maybe the same answer) ... how do they make these continuous forms available under the hood.

thanks

... not real application data in this record set example

design

the works

+6
source share
1 answer

Qt MVC is probably the best / easiest answer for your question ( http://qt-project.org/doc/qt-4.8/model-view-programming.html ), and with QTableView you can achieve what you want .

Another solution might be: if you have a set of corrections for the column elements in each row, you can simply create a QWidget with the contents of the row and insert your elements (rows) into the QVerticalLayout.

Although I would advise you to try with MVC, because it was the preferred way, in which case you could even port it to use the QML interface if you want (although you can use the same data classes for the backend). QML is by far the best approach for (even slightly) animated user interfaces, and it's mature enough to use it already (it is part of Qt 4.8 and will be the β€œstar” of Qt 5).

+2
source

Source: https://habr.com/ru/post/914401/


All Articles