Wohoo i fixed it, never mind!
dont place it in the class, place it here:
def main(args):
demo = make()
app.setMainWidget(demo)
demo.canvas())
zoomer.
setRubberBandPen(qt.
QPen(qt.
Qt.
green)) demo.canvas())
picker.
setTrackerPen(qt.
QPen(qt.
Qt.
red))
sys.exit(app.exec_loop())
# main()
def main(args):
app = qt.QApplication(args)
demo = make()
app.setMainWidget(demo)
zoomer = Qwt.QwtPlotZoomer(Qwt.QwtPlot.xBottom,
Qwt.QwtPlot.yLeft,
Qwt.QwtPicker.DragSelection,
Qwt.QwtPicker.AlwaysOff,
demo.canvas())
zoomer.setRubberBandPen(qt.QPen(qt.Qt.green))
picker = Qwt.QwtPlotPicker(Qwt.QwtPlot.xBottom,
Qwt.QwtPlot.yLeft,
Qwt.QwtPicker.NoSelection,
Qwt.QwtPlotPicker.CrossRubberBand,
Qwt.QwtPicker.AlwaysOn,
demo.canvas())
picker.setTrackerPen(qt.QPen(qt.Qt.red))
sys.exit(app.exec_loop())
# main()
To copy to clipboard, switch view to plain text mode
Bookmarks