[Development] Removing Wacom support in Qt5

Shaw Andy Andy.Shaw at digia.com
Tue Sep 11 07:04:30 CEST 2012


> On 10 September 2012 12:58, Shaw Andy <Andy.Shaw at digia.com> wrote:
> 
> > To clarify, I did the patch that everyone is referring to, I actually did it in my
> Nokia days when I had access to the tablet and passed it on to someone after
> I joined Digia.  It is a hack because I had to try and get around the mouse
> position problem, I tried then to figure out how to do it properly so it could
> be submitted at the time but was unable to do so.  Since I guess the tablet is
> going to end up back in Digia hands (assuming someone knows where it is in
> the Oslo office) I am willing to look at this again but would prefer someone
> who could help on this side of things as my knowledge of the tablet side is
> limited at best and I couldn't find out where the information needed was
> actually being stored.  If I could get that information I think I could solve the
> rest.  Again assuming the tablet is still around and usable somewhere :)
> 
> I grabbed the Intuos 3, it's still around.  And I can reproduce the
> bug that with Qt 4.x apps (even the latest Creator released) it's not
> usually possible to interact with most QWidgets using the Wacom mouse.
>  (The stylus has gone missing for the moment but I think we will find
> it, and I also have an old Cintiq at home so maybe the stylus is
> compatible).  Whereas with Qt 5, Thiago's explanation makes sense, it
> works OK as a simple mouse because there is no specific support for
> it.
> 
> So now I'm trying to understand how it worked in Qt 4 and what the
> right way forward ought to be.  I see that there are two choices:
> wintab32.dll which is provided by Wacom, that is what Qt 4 links
> against; and the RealTimeStylus class provided in the Windows SDK,
> which in theory ought to be more portable to other types of tablet
> PCs.  So I wonder if there is any reason we shouldn't use that for Qt
> 5?  Of course it may be a dumb question if too many features are
> missing (we have 2-axis pressure, 2-axis tilt and rotation, so I hope
> most of the data is there in the MS events, when the device reports
> it?)  There is a commercial program called ArtRage which apparently
> uses either or both drivers (you can choose them in the app settings).
>  Users report that wintab doesn't provide gesture support, and the
> reports are mixed about whether RTS provides pressure.

Based on my recollection as it is about 2 years ago since I did that patch and last looked at this, I believe it is all being sent as Windows messages, but I think you do need to use wintab32.dll for it and not the RealTimeStylus as I think that is potentially for the Windows Tablet PC which is not quite the same I believe.  But it warrants investigation in case it is usable.

> It's interesting that the first example I tried from Wacom confines
> the mouse to the window.  Probably not what we want Qt doing by
> default, so maybe that's the reason we needed a full-screen invisible
> window?  Just guessing.
> 
> I'm not normally a Windows guy, so if you know how to really fix this,
> maybe you will get it done faster than I will.  I just figured maybe I
> should have a quick look to see how feasible it is to fix this bug.

I think it is feasible with my patch which I think worked quite well with the execption of how I had to get the event position, if we can figure out how to solve that it would go a long way to getting it working in 4.8.  But that doesn't solve the Qt 5 issue, I have not really looked at that side of things yet and not even sure when I would get time, but if we can get the 4.8 side working that would ultimately help things.

Andy


More information about the Development mailing list