May-01-2024, 12:24 AM
(This post was last modified: May-01-2024, 07:21 AM by Gribouillis.)
Hello I have the following code that I want it to start counting from 0 adding 1 every time "pushbutton" is pressed and the value to be shown in "textBrowser", is this possible as I am having some trouble?:
from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(656, 383) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.pushButton = QtWidgets.QPushButton(self.centralwidget) self.pushButton.setGeometry(QtCore.QRect(230, 50, 51, 41)) self.pushButton.setObjectName("pushButton") self.textBrowser = QtWidgets.QTextBrowser(self.centralwidget) self.textBrowser.setGeometry(QtCore.QRect(80, 180, 61, 41)) self.textBrowser.setObjectName("textBrowser")
Gribouillis write May-01-2024, 07:21 AM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.