Changes for pyside:

customwidgets in ui-files and QtGui.QPen instantiation
This commit is contained in:
Dmitri Bogomolov 2018-02-19 14:38:25 +02:00
parent 4b49a2f41e
commit 132d20d698
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13
5 changed files with 7 additions and 8 deletions

View File

@ -1732,11 +1732,9 @@ class MyForm(settingsmixin.SMainWindow):
fontMetrics = QtGui.QFontMetrics(font) fontMetrics = QtGui.QFontMetrics(font)
rect = fontMetrics.boundingRect(txt) rect = fontMetrics.boundingRect(txt)
# draw text # draw text
# painter = QtGui.QPainter(self)
painter = QtGui.QPainter() painter = QtGui.QPainter()
painter.begin(pixmap) painter.begin(pixmap)
painter.setPen( painter.setPen(QtGui.QPen(QtGui.QColor(255, 0, 0)))
QtGui.QPen(QtGui.QColor(255, 0, 0), QtCore.Qt.SolidPattern))
painter.setFont(font) painter.setFont(font)
painter.drawText(24-rect.right()-marginX, -rect.top()+marginY, txt) painter.drawText(24-rect.right()-marginX, -rect.top()+marginY, txt)
painter.end() painter.end()

View File

@ -10,7 +10,7 @@ from utils import str_chan
from debug import logger from debug import logger
class AddressPassPhraseValidatorMixin(): class AddressPassPhraseValidatorMixin(object):
def setParams( def setParams(
self, passPhraseObject=None, addressObject=None, self, passPhraseObject=None, addressObject=None,
feedBackObject=None, buttonBox=None, addressMandatory=True feedBackObject=None, buttonBox=None, addressMandatory=True

View File

@ -98,7 +98,7 @@
<customwidget> <customwidget>
<class>STableWidget</class> <class>STableWidget</class>
<extends>QTableWidget</extends> <extends>QTableWidget</extends>
<header>bitmessageqt/settingsmixin.h</header> <header>bitmessageqt.settingsmixin</header>
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<resources> <resources>

View File

@ -296,7 +296,7 @@
<customwidget> <customwidget>
<class>STableWidget</class> <class>STableWidget</class>
<extends>QTableWidget</extends> <extends>QTableWidget</extends>
<header>bitmessageqt/settingsmixin.h</header> <header>bitmessageqt.settingsmixin</header>
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<resources> <resources>

View File

@ -133,11 +133,12 @@ class IdenticonRendererBase(object):
QtCore.QPointF(size, size), QtCore.QPointF(0., size)] QtCore.QPointF(size, size), QtCore.QPointF(0., size)]
rotation = [0, 90, 180, 270] rotation = [0, 90, 180, 270]
nopen = QtGui.QPen(foreColor, QtCore.Qt.NoPen) nopen = QtGui.QPen(foreColor)
nopen.setStyle(QtCore.Qt.NoPen)
foreBrush = QtGui.QBrush(foreColor, QtCore.Qt.SolidPattern) foreBrush = QtGui.QBrush(foreColor, QtCore.Qt.SolidPattern)
if penwidth > 0: if penwidth > 0:
pen_color = QtGui.QColor(255, 255, 255) pen_color = QtGui.QColor(255, 255, 255)
pen = QtGui.QPen(pen_color, QtCore.Qt.SolidPattern) pen = QtGui.QPen(pen_color)
pen.setWidth(penwidth) pen.setWidth(penwidth)
painter = QtGui.QPainter() painter = QtGui.QPainter()