Complex table with qt - how do I start?

user2494129

in the past, I have done a few small applications in QT. The user interfaces of my applications only contained a bunch of "standard" widgets (a few buttons, spacer, text fields...). However now, I want to build something bigger and more complex. The application I want to create, contains a pretty complex (at least for me) table structure.

I tried to design the layout in Excel (to see, if this kind of table structure is user friendly and works in general) and now I want to implement it with QT. I attached a picture, so that you can see how the table should look like at the end. For each day some kind of "sub-table" should be created, where the user can enter some values. If the user scrolls to the right, a new sub-table (with a new date) should be created. So basically, I want to create a pretty dynamic table. If the user scrolls to the left, he sees the old entries and if he scrolls to the right, new entries are created.

complex table structure

What's the best way to create this kind of table structure? Should I use a QTableWidget/QTableView structure and modify it like Excel does it (color cells, add spacings between cells...) or is it better to create some kind of custom widget (maybe a few textfields grouped together?)?

I would really appreciate if someone could give me an advice on how to start. At the moment, I am kind of lost...

Oliver

Warning: Answers to this question will be largely opinion based.

One problem that I see with creating one huge complex table is adaptability: what if you ever want to start grouping cells, collapsing/expanding sections, styling, enable/disable whole days, etc? Sure you could do this by hiding table cells and tracking which cells are headers and such but this approach will be missing many of the benefits that predefined controls provide.

You might want to consider subdividing your table into hierarchy of "panels": the top level panel is one row: your left-most static panel and then one panel per day; your next level is, within each day, you have a table with one column, the top row is your values panel, then your parameters panel, then your products panel. Finally, in each of those you have a "regular" table.

The actual Qt widgets you would use: one or more of QtGridLayout, QtBoxLayout, QtHBoxLayout, QtVBoxLayout, and maybe QtStackedLayout. See http://qt-project.org/doc/qt-4.8/layout.html for examples.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How do I stop and start a loop in QT?

From Dev

How do I do a complex computation on columns and rows of a data table?

From Dev

How do I make the text start at the bottom within the cell of a table?

From Dev

how do i insert a line at the start of the table in SQLite in android

From Dev

How do I make the text start at the bottom within the cell of a table?

From Dev

how do i insert a line at the start of the table in SQLite in android

From Dev

How do I get this complex query?

From Dev

How do I form this complex query in Hibernate?

From Dev

How do I organize complex data in julia

From Dev

How do I convert a complex number?

From Dev

How do I serialize a complex Class in GWT?

From Dev

How do I organize complex data in julia

From Dev

How do I start Cortana?

From Dev

How do I start emacs?

From Dev

How do I create a qt app in nim

From Dev

How do I localize a Qt qmldir plugin?

From Dev

how do i change a file extension on qt

From Dev

How do I display a counter function in qt

From Dev

How do I create a qt app in nim

From Dev

How do I upgrade qt version?

From Dev

How do I use Qt's example Borderlayout in Qt Designer?

From Dev

How do I use Qt's example Borderlayout in Qt Designer?

From Dev

How do I access Qt qrc folder directly Qt 5.10.1

From Dev

How do I build this complex database query in CakePHP 3.0?

From Dev

How do I write a complex multi-line if condition in Ruby?

From Dev

How do I initialize complex properties with no setter using Moq?

From Dev

How do I use my complex ViewModel in my View?

From Dev

How do I crossfade between scenes in ffmpeg using a complex filter?

From Dev

How do I get values from a complex JSON object?

Related Related

HotTag

Archive