Changes for pyside:
customwidgets in ui-files and QtGui.QPen instantiation
This commit is contained in:
parent
51b5e64f34
commit
39a1d69b5d
|
@ -1779,11 +1779,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()
|
||||
|
|
|
@ -98,7 +98,7 @@
|
|||
<customwidget>
|
||||
<class>STableWidget</class>
|
||||
<extends>QTableWidget</extends>
|
||||
<header>bitmessageqt/settingsmixin.h</header>
|
||||
<header>bitmessageqt.settingsmixin</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
|
|
|
@ -296,7 +296,7 @@
|
|||
<customwidget>
|
||||
<class>STableWidget</class>
|
||||
<extends>QTableWidget</extends>
|
||||
<header>bitmessageqt/settingsmixin.h</header>
|
||||
<header>bitmessageqt.settingsmixin</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
|
|
|
@ -94,11 +94,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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user