I' m now able to display the licence in the last tab but impossible for the first, second and third tab. In fact, it is the same thing than the first tab.
Even it is a secondary GUI (displayed in the main window when she is called). Here the code of the credits screen.
I've tried several things but I don't get an output (under a mysterious Sig Error). I've tried too the python module faulthandler without any success.
Did you have an idea about what I've done wrong ?
By Advance Thanks.
import os
from PyQt5.QtWidgets import QDialog
from ui.creditsui import Ui_creditscreen
OG = {'name': 'Olivier Girard', 'email': 'olivier@ecrxxxxx.org'}
CREDITS = {'code': [OG],
'documentation': [OG],
'translation': [OG],
}
path_licence = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
class Credits(QDialog):
def __init__(self, parent=None):
super(Credits, self).__init__(parent)
self.setupUi()
self.showLicense()
self.showAuthors()
def setupUi(self):
self.ui = Ui_creditscreen()
self.ui.setupUi(self)
def showLicense(self):
# path_li = os.path.join(path_licence, "licence.txt")
with open('licence.txt', 'r') as my_licence:
text = my_licence.read()
self.ui.textBrowserlicense.setPlainText(text)
# self.ui.textBrowserlicense.setText(text)
def showAuthors(self):
authors = []
for person in CREDITS['code']:
name = person['name']
email = person['email']
authors.append("{} <{}>".format(name, email))
self.ui.textBrowserwritten.setText(authors)
def showDocumenters(self):
authors = []
for person in CREDITS['documentation']:
name = person['name']
email = person['email']
authors.append("{} <{}>".format(name, email))
self.ui.textBrowserdocumented.setText(authors)
def showTranslators(self):
authors = []
for person in CREDITS['translation']:
name = person['name']
email = person['email']
authors.append("{} <{}>".format(name, email))
self.ui.textBrowsertranslated(authors)