Python Forum
Missing characters in PyQt5
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Missing characters in PyQt5
#1
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?
Reply
#2
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?
Reply
#3
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?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Huge code problems (buttons(PyQt5),PyQt5 Threads, Windows etc) ZenWoR 0 2,829 Apr-06-2019, 11:15 PM
Last Post: ZenWoR

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020