import sys from PyQt5.QtWidgets import QApplication, QWidget, QMainWindow, QPushButton from PyQt5.Qt import QStandardItemModel, QStandardItem from PyQt5.QtGui import QIcon from PyQt5.QtCore import pyqtSlot import json import GlowstoneDust class App(QMainWindow): def __init__(self): super().__init__() self.title = 'Project Glowstone: Block Edition' self.left = 300 self.top = 300 self.width = 640 self.height = 480 self.initUI() def initUI(self): self.setWindowTitle(self.title) self.setGeometry(self.left, self.top, self.width, self.height) button = QPushButton('Button Label Go Here', self) button.setToolTip('Example Button') button.setGeometry(100, 70, 200, 80) # button.move(100, 70) button.clicked.connect(self.make_tree) self.statusBar().showMessage('Message') self.show() @pyqtSlot() def on_click(self): print('PyQt5 button click') @pyqtSlot() def make_tree(self): print("Making mod tree...") modpack_info = GlowstoneDust.get_modpack_info('.') print(json.dumps(modpack_info)) if __name__ == '__main__': app = QApplication(sys.argv) ex = App() sys.exit(app.exec_())