Oct-06-2017, 03:05 PM
I'm trying out Qt4 and just want to print out a string in a window. Now, the string is clipped. All characters are not printed. So what am I missing?
FYI, I'm using python 2.7 on Ubuntu dist.
FYI, I'm using python 2.7 on Ubuntu dist.
import sys
from PyQt4 import QtGui
from PyQt4 import QtCore
class ProdTestMonitor(QtGui.QMainWindow):
def __init__(self):
super(ProdTestMonitor, self).__init__()
self.setGeometry(100, 30, 500, 300)
self.initUI()
def initUI(self):
comPortLbl = QtGui.QLabel(self)
comPortLbl.move(20, 100)
comPortLbl.setText('This line is just to long:')
def main():
app = QtGui.QApplication(sys.argv)
frame = ProdTestMonitor()
frame.show()
sys.exit(app.exec_())
if __name__ == "__main__":
main()Thanks in advance.

.