0

I have a QGridLayout containing mostly QLabels. It's a 3x10 grid and I want different margins on the content of each of the three columns. Eg. I want to be able to place my labels with a different amount of space to their grid border.

If I set the property ContentMargins it just refers to everything in my grid.

In other words: How do I set content margins for a single column in a QGridLayout?

...and while we're at it, can you do the same for individual rows?

Thank you in advance for your help!

A.Faur
  • 93
  • 2
  • 8

1 Answers1

0

I suggest you to set QGridLayout margins to 0 and add for each column a QVertiacalLayout item. and set margins in QVertiacal layout in stance

Ruslan F.
  • 5,498
  • 3
  • 23
  • 42
  • Yes, this is not exactly an answer to my question, but it makes sense. In fact, maybe i should just make a QHBoxLayout and add three QVBoxLayouts to it. That way I can handle the QVBoxLayouts individually, like you say. Thank you. – A.Faur Sep 19 '13 at 07:17