From 36ba971b2e78a08dc78d594eaad39d7f5fcee7e5 Mon Sep 17 00:00:00 2001 From: Boris Basic Date: Tue, 17 Mar 2020 17:29:46 +0100 Subject: [PATCH] Enable PyQt5 compatibility --- NodeGraphQt/widgets/scene.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NodeGraphQt/widgets/scene.py b/NodeGraphQt/widgets/scene.py index 165a958a..3e529991 100644 --- a/NodeGraphQt/widgets/scene.py +++ b/NodeGraphQt/widgets/scene.py @@ -32,8 +32,8 @@ def _draw_grid(self, painter, rect, pen, grid_size): first_top = top - (top % grid_size) lines = [] - lines.extend([QtCore.QLine(x, top, x, bottom) for x in range(first_left, right, grid_size)]) - lines.extend([QtCore.QLine(left, y, right, y) for y in range(first_top, bottom, grid_size)]) + lines.extend([QtCore.QLineF(x, top, x, bottom) for x in range(first_left, right, grid_size)]) + lines.extend([QtCore.QLineF(left, y, right, y) for y in range(first_top, bottom, grid_size)]) painter.setPen(pen) painter.drawLines(lines)