diff options
author | Blaine | 2020-05-14 20:56:49 +0530 |
---|---|---|
committer | Blaine | 2020-05-14 20:56:49 +0530 |
commit | aab2924c33eaa4de26203aee76a8e1f4a8ee559d (patch) | |
tree | 41be50d5ac50989ad0f4326aef584d5f34806d7c /src/main/python/utils/canvas.py | |
parent | 055276d6ec4ffa7d812df6d5b2811eb87d685444 (diff) | |
download | Chemical-PFD-aab2924c33eaa4de26203aee76a8e1f4a8ee559d.tar.gz Chemical-PFD-aab2924c33eaa4de26203aee76a8e1f4a8ee559d.tar.bz2 Chemical-PFD-aab2924c33eaa4de26203aee76a8e1f4a8ee559d.zip |
enable drag and drop
Diffstat (limited to 'src/main/python/utils/canvas.py')
-rw-r--r-- | src/main/python/utils/canvas.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/python/utils/canvas.py b/src/main/python/utils/canvas.py index d393e36..2332087 100644 --- a/src/main/python/utils/canvas.py +++ b/src/main/python/utils/canvas.py @@ -2,12 +2,11 @@ import pickle from PyQt5.QtCore import Qt from PyQt5.QtGui import QBrush, QPalette -from PyQt5.QtWidgets import (QFileDialog, QApplication, - QGraphicsScene, QGraphicsView, QHBoxLayout, QMenu, +from PyQt5.QtWidgets import (QFileDialog, QApplication, QHBoxLayout, QMenu, QTabWidget, QWidget, QSpacerItem, QStyle) from . import dialogs -from .graphics import customView +from .graphics import customView, customScene from .data import paperSizes, ppiList, sheetDimensionList class canvas(QWidget): @@ -28,7 +27,7 @@ class canvas(QWidget): # when we will draw items on this, this might be changed if QGraphicScene is subclassed. #set layout and background color - self.painter = QGraphicsScene() + self.painter = customScene() self.painter.setBackgroundBrush(QBrush(Qt.white)) #set white background self.view = customView(self.painter, self) #create a viewport for the canvas board |