Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- first_row = QtGui.QHBoxLayout()
- setings_search = QtGui.QVBoxLayout()
- search_label = QtGui.QLabel()
- search_pixmap = QtGui.QPixmap()
- search_pixmap.load('search.png')
- #search_pixmap.scaledToWidth(130)
- #search_pixmap.scaledToHeight(130)
- search_label.setPixmap(search_pixmap)
- setings_search.addWidget(search_label)
- first_row.addLayout(setings_search)
- from PyQt4 import QtGui
- app = QtGui.QApplication([])
- label = QtGui.QLabel()
- pixmap = QtGui.QPixmap()
- pixmap.load('test.png')
- pixmap = pixmap.scaledToWidth(20)
- label.setPixmap(pixmap)
- label.show()
- app.exec_()
- def paintEvent(self, event):
- qp = QtGui.QPainter()
- search_pixmap = QtGui.QPixmap('search.png')
- qp.drawPixmap(posX, posY, width, height, pixmap.scaled(width, height, transformMode=QtCore.Qt.SmoothTransformation))
Add Comment
Please, Sign In to add comment