setSpacing not working
-
for (int i = 0; i < m_nItemCnt; i++) { CItems* pItem = new CItems(size, this); this->ui.GL_title->addWidget(this->ui.label, 0, 0, 0, m_lstIncubateItems.length()); this->ui.HL_items->addWidget(pItem); this->ui.HL_items->setSpacing(1); }
When the first item is created, the spacing property works, but if the second and third are added, the spacing property is not applied.
-
What is a CItem? What type of object is ui.GL_title? ui.HL_items?
Which of the bits of that picture are the three items you refer to?
Why do you think setSpacing() is not working?We can guess, but should not have to.
At first glance this->ui.label, i.e. the same instance, gets sent to addWidget() multiple times... suspicious
-
What is a CItem? What type of object is ui.GL_title? ui.HL_items?
Which of the bits of that picture are the three items you refer to?
Why do you think setSpacing() is not working?We can guess, but should not have to.
At first glance this->ui.label, i.e. the same instance, gets sent to addWidget() multiple times... suspicious
I'll explain the structure. Citems class is customized Ui.
There's a userItem class in the Citems class.Textlabel needs to change dynamically depending on the number of useritems.
I've been labelling it several times to increase the Colspan on the grid layout.
-
In your first image I see two sets of three equally sized widgets in two separate horizontal layouts.
In your latest image I see three equally sized widgets in a horizontal layout.
I assume your complaint is that you cannot see a 1 pixel vertical line between the second and third widget in each horizontal layout.What are the constraints on the size of the CItems and horizontal layouts that contain them?
-
In your first image I see two sets of three equally sized widgets in two separate horizontal layouts.
In your latest image I see three equally sized widgets in a horizontal layout.
I assume your complaint is that you cannot see a 1 pixel vertical line between the second and third widget in each horizontal layout.What are the constraints on the size of the CItems and horizontal layouts that contain them?