Issue
I want to make elements in row in one layout and a lot of layouts will be in GroupBox, it must be like this.
I try to release this
formLayout = QFormLayout()
for i in range(50):
formLayout.addRow(QLabel(i), QPushButton("Start"))
groupBox.setLayout(formLayout)
self.scrollArea.setWidget(groupBox)
self.scrollArea.setWidgetResizable(True)
I know that i should make in grib layout, because i have a lot of elements, but how can I create a layout with layouts which everyone have 9 elements?
Just explain how it should be grouped , like this scrollArea->groupBox->formLayout.addrow(elements)
I don't need full code, him I can write myself.
Solution
The layout you're showing is not a form layout, it could be a grid layout, but it actually seems more like a QTableView (or QTableWidget) or even a QTreeView (if those small arrows on the left are used to expand elements). Using nested layouts in this case might not be a good solution, as each layout would be independent from the others, with the result that the widgets might not be properly aligned. This small arrows for expand element in that case a QTreeView with a QStandardItemModel or a QTreeWidget might help, then use setItemWidget() to add buttons. – musicamante
Answered By - Some one
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.