From 58466d5424767a7f342063196e331413cddc06da Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Mon, 19 Feb 2018 14:38:25 +0200 Subject: [PATCH] Changes for pyside: customwidgets in ui-files and QtGui.QPen instantiation --- src/bitmessageqt/__init__.py | 4 +--- src/bitmessageqt/blacklist.ui | 2 +- src/bitmessageqt/networkstatus.ui | 2 +- src/qidenticon.py | 5 +++-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index eaac4968..d25f2f14 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -1781,11 +1781,9 @@ class MyForm(settingsmixin.SMainWindow): fontMetrics = QtGui.QFontMetrics(font) rect = fontMetrics.boundingRect(txt) # draw text - # painter = QtGui.QPainter(self) painter = QtGui.QPainter() painter.begin(pixmap) - painter.setPen( - QtGui.QPen(QtGui.QColor(255, 0, 0), QtCore.Qt.SolidPattern)) + painter.setPen(QtGui.QPen(QtGui.QColor(255, 0, 0))) painter.setFont(font) painter.drawText(24-rect.right()-marginX, -rect.top()+marginY, txt) painter.end() diff --git a/src/bitmessageqt/blacklist.ui b/src/bitmessageqt/blacklist.ui index 80993fac..3068a6ae 100644 --- a/src/bitmessageqt/blacklist.ui +++ b/src/bitmessageqt/blacklist.ui @@ -98,7 +98,7 @@ STableWidget QTableWidget -
bitmessageqt/settingsmixin.h
+
bitmessageqt.settingsmixin
diff --git a/src/bitmessageqt/networkstatus.ui b/src/bitmessageqt/networkstatus.ui index e0c01b57..14aeca6e 100644 --- a/src/bitmessageqt/networkstatus.ui +++ b/src/bitmessageqt/networkstatus.ui @@ -296,7 +296,7 @@ STableWidget QTableWidget -
bitmessageqt/settingsmixin.h
+
bitmessageqt.settingsmixin
diff --git a/src/qidenticon.py b/src/qidenticon.py index 13be3578..5294da86 100644 --- a/src/qidenticon.py +++ b/src/qidenticon.py @@ -129,11 +129,12 @@ class IdenticonRendererBase(object): QtCore.QPointF(size, size), QtCore.QPointF(0., size)] 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) if penwidth > 0: pen_color = QtGui.QColor(255, 255, 255) - pen = QtGui.QPen(pen_color, QtCore.Qt.SolidPattern) + pen = QtGui.QPen(pen_color) pen.setWidth(penwidth) painter = QtGui.QPainter()