добавил заготовку и r.txt
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
from PyQt5.QtWidgets import *
|
||||
from PyQt5.QtGui import QPixmap
|
||||
import sys
|
||||
|
||||
|
||||
class Window(QMainWindow):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
self.acceptDrops()
|
||||
self.setWindowTitle("Image")
|
||||
self.setGeometry(0, 0, 400, 300)
|
||||
self.label = QLabel(self)
|
||||
self.pixmap = QPixmap('image.png')
|
||||
self.label.setPixmap(self.pixmap)
|
||||
self.label.resize(self.pixmap.width(), self.pixmap.height())
|
||||
self.show()
|
||||
|
||||
|
||||
App = QApplication(sys.argv)
|
||||
window = Window()
|
||||
sys.exit(App.exec())
|
||||
Reference in New Issue
Block a user