Python Forum

Full Version: Missing characters in PyQt5
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
When running a QT GUI it randomly drops characters.
Most common is it will just leave out full stops and commas, but sometimes it will just leave out huge chunks of numbers and letters, can't really see a pattern in what it is leaving out.

Has anyone had an issue such as this before?
Could you show the code.
I haven't seen this behavior before.
Is it possible that you are layering a widget on top of your missing text?
Hey Larz60+

I will try put some code in, it is about 2000 lines of code spread over 4 worksheets. So I am just going to drop what looks suspicious.

MainCode:
from PyQt5.QtGui import QColor
from PyQt5.QtWidgets import QApplication, QFileDialog, QDialog, QMessageBox
from interfaceUI import Ui_MainWindow

class interface(Ui_MainWindow):
    def __init__(self, Application):
        Ui_MainWindow.__init__(self)
        self.setupUi(Application)

#I believe this may be where all the issues arise from		
app = 0
app = QApplication(sys.argv)
Application = QDialog() 
Program = interface(Application)
Application.show()
app.exec_()
GUI generated from pyqt5
class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(1041, 680)
		self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.start_btn = QtWidgets.QPushButton(self.centralwidget
		
		self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
    
	def retranslateUi(self, MainWindow):
        _translate = QtCore.QCoreApplication.translate
Something that I still want to be able to accomplish is the ability to call text boxes and other objects from outside of their "self" name. I have been doing this with something along these line:
Program.Textbox.setText()
Is there a way to maintain this feature?