def _fill_bus_boxes(self): kys = BusFactory().createable_objects() row = 0 col = 0 for ky in list(kys): # Information gathering name = self._load_gui_name(ky, BusFactory()) ico = self._load_gui_icon(ky, BusFactory()) # New Element per Object gb = GBuilder().groupbox(self, name, None, None) gb.setFont(QtGui.QFont('SansSerif', 7)) gb.setFixedHeight(70) gb.setFixedWidth(70) db = GBuilder().dragbutton(gb, '', self._add_component_boxes, ico, icon_x=45, icon_y=45, size_x=60, size_y=50, pos_x=5, pos_y=15) db.set_drop_func(self.core.add_bus_box_to_env) db.set_move_icon_context_acts(self.core.load_context_menu_actions(ky)) db.ecu_key = ky db.setCheckable(True) db.setStyleSheet('QPushButton {background-color: #F2F2F2; color: red;border: 0px solid gray;border-radius: 12px;}') # Add to Layout self.bus_box.addWidget(gb, row, col, Qt.AlignTop) col += 1 if col == 3: row += 1 col = 0 # Add Widget self.bus_box.addWidget(QWidget())