I finally got a rudimentary GUI for my RoastMaster Utilities working.
Here is the code with a brief explanation of the problem spot. If I had a bit of experience with python classes and inheritance, I probably wouldn’t have had problems.
from PyQt5 import QtCore, QtGui, QtWidgets import coffeeMenu as cm import RMPasteData as pd import sys from RMUtility2 import Ui_MainWindow class MyWindow(Ui_MainWindow): ''' Inherit from class created by Qt designer in the file RMUtility2 The critical part is in the __init__ method (also known as a constructor) below. You usually see it as super().__init__() which would call the __init__ method of the parent class however Qt Designer doesn't provide an __init__. It provides the setupUi method instead. ''' def __init__(self): super().setupUi(MainWindow) def setupUi(self, MainWindow): print("In local setupUI") self.coffeeButton.clicked.connect(self.coffeeMenu) self.pasteDataButton.clicked.connect(self.pasteData) def coffeeMenu(self): debug = False roastmaster_db = 'C:/Users/kor/Dropbox/Apps/Roastmaster/Kor Database.sqlite' # roastmaster_db = 'c:/users/kor/dropbox/apps/roastmaster/Kor Database.sqlite' cm.check_db(roastmaster_db) cm.show_coffee_list(debug) cm.create_report() def pasteData(self): print("In pastData - local") debug = False roastmaster_db = 'c:/users/kor/dropbox/apps/roastmaster/Kor Database.sqlite' # roastmaster_db = 'C:/Users/kiley_000/Dropbox/Apps/Roastmaster/My Database.sqlite' pd.check_db(roastmaster_db) pd.show_coffee_list() pd.create_report() if __name__ == "__main__": import sys app = QtWidgets.QApplication(sys.argv) MainWindow = QtWidgets.QMainWindow() ui = MyWindow() ui.setupUi(MainWindow) MainWindow.show() sys.exit(app.exec_())