I am first time to learning PyQt5 and I am puzzled by qlabel The windows 10 cmd "wmic cpu get name" will return current CPU name. (e.g: Name Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz) I want put this result into qlabel. which Public Functions or slots suit for this result? Thanks
from PyQt5 import QtWidgets
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
import xxxx_UI as ui
import subprocess,os,sys
class Main(QMainWindow, ui.Ui_MainWindow):
def __init__(self):
super().__init__()
self.setupUi(self)
self.Exit_BTN.clicked.connect(self.buttonClicked)
Processor_content=os.system("wmic cpu get name")
self.processor_content.settext(self.processor_content)
def buttonClicked(self):
window.destroy()
if __name__ == '__main__':
import sys
app = QtWidgets.QApplication(sys.argv)
window = Main()
window.show()
sys.exit(app.exec_())