[Kst] Re: Double click to open plot dialog: no luck :-(

Peter Kümmel syntheticpp at gmx.net
Thu Jun 30 21:40:37 CEST 2011

On 29.06.2011 23:27, Nicolas Brisset wrote:
> Hi,
> as mentioned by Barth in the log of commit #1234248 the current behavior to open the plot dialog when clicking on the axes is single click. I think double-click would be more consistent with other similar actions (like opening the edit curve dialog when double-clicking on a curve) and I thought I'd manage to change that on my own. I have failed :-(
> I believe the core of the action happens in the PlotItem::mousePressEvent method, but when I try to filter the events by introducing something like
> if (view()->viewMode() == View::Data&&  event->button() == Qt::LeftButton&&  event->type() == QEvent::GraphicsSceneMouseDoubleClick)
> then nothing more happens. I have also tried QEvent::MouseButtonDblClick without success. What am I doing wrong?

Reimplement the double-click function.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: doubleclick.patch
Type: text/x-patch
Size: 1083 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kst/attachments/20110630/54692eda/attachment.patch 

More information about the Kst mailing list