How to approach a grid of controls

I'm trying to create a dialog that has a grid of "records", each record having a set number of "columns" (other form controls, such as DzCheckBox, DzLineEdit, etc).

I have been able to more or less achieve basic functionality by creating a DzVGroupBox, setting DzVGroupBox.columns to the number of controls I want in the "grid", then manually adding a row of DzLabels, then a row of each set of controls, keeping track of them as an Array of Objects.

This works fine until I want to remove a "record", or all records.

How can you remove controls from a DzDialog (or any DzWidget for that matter)?
I'm open to other approaches to solving this problem as well. I have explored the DzListView, but that seems to not support various controls, nor editability, though to be fair, I've only figured out how to display text, so I may be missing something fundamental there as well.

Thanks for the help.

Comments

  • Have you looked at DzGridLayout?

  • djigneodjigneo Posts: 283

    I imagine that DzGridLayout would be helpful for arranging the controls that are in a big group like I'm doing now. It doesn't really address the question in the OP at all though:
    How can a row be deleted?

  • V3DigitimesV3Digitimes Posts: 3,150

    I met the same issue as you have. A kind of "conditional display of elements in the layout" depending on some inputs from the scene. I have been unable to solve it.

    There is a command I used which was something like (my remembers are not precise) Widget.hide(); but when I used it, the widget was hidden, but the widgets around did not move properly to hide the empty space. Not satisfying, I did not use that.

Sign In or Register to comment.