help coding: bug 327896

Boudewijn Rempt boud at valdyas.org
Fri Mar 28 08:40:00 UTC 2014


I only took a quick look, so I haven't got a full solution yet, but:

* you don't need the signal/slot connection for the wheel event; the event handler is nested, so the toplevel widget gets the events for all subwidgets that don't handle the events explicitly.

* you need to accept() the event and otherwise ignore it

* and you probably need to set an event handler on the tableview object, as sven said on irc, to capture the event before it handles it itself.

On Thursday 27 March 2014 Mar 19:14:26 Ghevan wrote:
> Hi again. I seem to have hit a brick wall working on bug
> https://bugs.kde.org/show_bug.cgi?id=327896
> 
> I can resize the color swatches up and down using CTRL + wheel delta, but
> if there is a scrollbar and the scroll can happen then this action happens
> first before any resize as the video shows. What I want is to block the
> scroll bar while Ctrl is pressed, or ignore the scroll action.
> 
> From what I have read, i could make it using an eventFilter on. One of my
> problems is that I don't know how to use the filter. The other problem is,
> because I tried many compile variations (and all compiled and worked), that
> perhaps the wheel event is badly declared and resize doesn't take priority
> over the scroll action.
> 
> Source code and Video
> https://drive.google.com/file/d/0B5HUTZG6uL8iT0xNTTFwVnhIYW8/edit?usp=sharing
> 
> Any help is greatly appreciated.
> 
> -IvanYossi-
> C++ Noob extraordinary

-- 
Boudewijn Rempt
http://www.valdyas.org, http://www.krita.org, http://www.boudewijnrempt.nl



More information about the kimageshop mailing list