def modulesInfo(self) -> QGroupBox: """Create a QGridLayout with two columns displaying module information. The first column contains the module name, the second column version (if loaded) or availability. Modules are listed in the order given by :py:meth:modules. Returns ------ box: QGroupBox A QWidget displaying the module information. """ box = QGroupBox('Modules') box.setMinimumWidth(300) self._moduleGrid = QGridLayout() self._moduleGrid.addWidget(QLabel("<b>Package</b>", self), 0, 0) self._moduleGrid.addWidget(QLabel("<b>Version</b>", self), 0, 1) for i, m in enumerate(ModuleResource): button = QPushButton(m.label, self) button.ID = m._id # FIXME[hack] button.setFlat(True) button.clicked.connect(self._onInfo) self._moduleGrid.addWidget(button, 1 + i, 0) self._moduleGrid.addWidget(QLabel('', self), 1 + i, 1) self._updateModules() boxLayout = QVBoxLayout() boxLayout.addLayout(self._moduleGrid) updateButton = QPushButton("Update") updateButton.clicked.connect(self._onUpdateModules) boxLayout.addWidget(updateButton) boxLayout.addStretch() box.setLayout(boxLayout) return box