summaryrefslogtreecommitdiff
path: root/Bin_Phase_env.py
diff options
context:
space:
mode:
authorAyush Agrawal2020-01-02 16:16:18 +0530
committerAyush Agrawal2020-01-02 16:16:18 +0530
commit4138fd762a45b15dc7dfea661a93a047a0eba4a0 (patch)
treefc73e650efa51542e6806bfd6d37cde393d5b81a /Bin_Phase_env.py
parentf03c3898b95663c3b2b868b5de122f682773c51b (diff)
downloadChemical-Simulator-GUI-4138fd762a45b15dc7dfea661a93a047a0eba4a0.tar.gz
Chemical-Simulator-GUI-4138fd762a45b15dc7dfea661a93a047a0eba4a0.tar.bz2
Chemical-Simulator-GUI-4138fd762a45b15dc7dfea661a93a047a0eba4a0.zip
Added Tool-tip in graph
Diffstat (limited to 'Bin_Phase_env.py')
-rw-r--r--Bin_Phase_env.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Bin_Phase_env.py b/Bin_Phase_env.py
index 31fd766..a892d78 100644
--- a/Bin_Phase_env.py
+++ b/Bin_Phase_env.py
@@ -242,6 +242,7 @@ class Bin_Phase_env(QWidget,ui_dialog):
view_box = plt.plotItem.vb
+ self.tool_tip = ""
def pressEvent(evt):
@@ -262,10 +263,12 @@ class Bin_Phase_env(QWidget,ui_dialog):
if colour.red()==255 or colour.blue()==255:
self.lineEdit_x.setText(str(round(mousepoint.x(),3)))
self.lineEdit_y.setText(str(round(mousepoint.y(),3)))
+ self.tool_tip = str(round(mousepoint.x(),3)) + ", " + str(round(mousepoint.y(),3))
QApplication.setOverrideCursor(QCursor(QtCore.Qt.CrossCursor))
else:
self.lineEdit_x.setText("")
self.lineEdit_y.setText("")
+ self.tool_tip = ""
QApplication.setOverrideCursor(QCursor(QtCore.Qt.ArrowCursor))
@@ -278,6 +281,8 @@ class Bin_Phase_env(QWidget,ui_dialog):
self.lineEdit_x.setText("")
self.lineEdit_y.setText("")
QApplication.setOverrideCursor(QCursor(QtCore.Qt.ArrowCursor))
+ else:
+ i.setToolTip(self.tool_tip)
# print(items)