matplotlib crosshair cursor in PyQt dialog does not show up
Clash Royale CLAN TAG #URR8PPP matplotlib crosshair cursor in PyQt dialog does not show up I want to have a crosshair at the cursor in my matplotlib window. This works out in the example, given in the matplotlib gallery. But unfortunately, it does not work if I have the matplotlib widget in a Qt dialog window ( QDialog ). matplotlib QDialog This is my sample of code, where I want to instantiate the matplotlib.widgets.Cursor object, but nothing shows up. matplotlib.widgets.Cursor import sys from PyQt4 import QtGui from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas import matplotlib.pyplot as plt from matplotlib.widgets import Cursor class Window(QtGui.QDialog): def __init__(self, parent=None): super(Window, self).__init__(parent) self.figure = plt.figure(facecolor='white') self.canvas = FigureCanvas(self.figure) layout = QtGui.QVBoxLayout() layout.addWidget(self.canvas) self.setLayout(layout) ...