我正在使用QCustomPlot
我试图编写代码的地方,一旦用户按下鼠标并拖动,它将重新调整我的轴。我做了:
connect(ui->plot, SIGNAL(mousePress(QMouseEvent *event)), this, SLOT(mousedrag(QMouseEvent*)));
我不断得到:
QObject::connect: 没有这样的信号 QCustomPlot::mousePress(QMouseEvent *event)
但是mouseWheel(QWheelEvent*)
两者mouseWheel
都在库mousePress
中声明了信号。QCustomPlot
我哪里错了?此外,如果有人有更好的信号来触发我的函数mousedrag(QMouseEvent*)
,该函数根据 y1 轴重新调整 y2 轴,我愿意接受建议。