KEMBAR78
Ui Mainwindow - Py | PDF
0% found this document useful (0 votes)
1 views2 pages

Ui Mainwindow - Py

The document defines a PyQt5 user interface for a main window titled 'CSV SPI Sender'. It includes a button to select a CSV file, a button to send data, and a label to display the selected file path. The window is set to a size of 480x150 pixels and contains a status bar.

Uploaded by

jainambohara03
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views2 pages

Ui Mainwindow - Py

The document defines a PyQt5 user interface for a main window titled 'CSV SPI Sender'. It includes a button to select a CSV file, a button to send data, and a label to display the selected file path. The window is set to a size of 480x150 pixels and contains a status bar.

Uploaded by

jainambohara03
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

FILE NAME – ui-mainwindow.

py

# -*- coding: utf-8 -*-

from PyQt5 import QtCore, QtGui, QtWidgets

class Ui_MainWindow(object):

def setupUi(self, MainWindow):

MainWindow.setObjectName("MainWindow")

MainWindow.resize(480, 150)

self.centralwidget = QtWidgets.QWidget(MainWindow)

self.centralwidget.setObjectName("centralwidget")

# Select File Button

self.selectButton = QtWidgets.QPushButton(self.centralwidget)

self.selectButton.setGeometry(QtCore.QRect(30, 20, 120, 30))

self.selectButton.setObjectName("selectButton")

# Send Data Button

self.sendButton = QtWidgets.QPushButton(self.centralwidget)

self.sendButton.setGeometry(QtCore.QRect(160, 20, 120, 30))

self.sendButton.setObjectName("sendButton")

# File Path Display

self.labelPath = QtWidgets.QLabel(self.centralwidget)

self.labelPath.setGeometry(QtCore.QRect(30, 70, 420, 20))

self.labelPath.setFrameShape(QtWidgets.QFrame.Panel)

self.labelPath.setFrameShadow(QtWidgets.QFrame.Sunken)

self.labelPath.setObjectName("labelPath")
MainWindow.setCentralWidget(self.centralwidget)

self.statusbar = QtWidgets.QStatusBar(MainWindow)

MainWindow.setStatusBar(self.statusbar)

self.retranslateUi(MainWindow)

QtCore.QMetaObject.connectSlotsByName(MainWindow)

def retranslateUi(self, MainWindow):

_translate = QtCore.QCoreApplication.translate

MainWindow.setWindowTitle(_translate("MainWindow", "CSV SPI Sender"))

self.selectButton.setText(_translate("MainWindow", "Select CSV File"))

self.sendButton.setText(_translate("MainWindow", "Send Data"))

self.labelPath.setText(_translate("MainWindow", "No file selected"))

You might also like