Archive for the ‘Qt’ Category

Wacom tablet does not work in Qt

Saturday, February 27th, 2010

I’m at Deventer, we are having Krita sprint. I’m trying to implement some new stuff in Krita and I can’t :’( Tablet stopped to work for me in Krita and basically in Qt. I don’t see tablet events (qt example in widgets/tablet does not show anything), so no pressure, no tilt, just mouse events.

I have Fedora 12, Qt 4.6.2. linuxwacom was replaced by xorg-x11-drv-wacom, so there are no utilities like wacdump or xidump now.I removed old configuration lines in xorg.conf. They were needed long time ago, I used to setup my tablet according wacom tablet. I depend on the evdev now. The tablet work in mypaint and in Gimp. I have pressure support there.

I don’t have tablet pressure in Qt example in qt4/examples/widgets/tablet nor in Krita.

Cyrille proposed to check this command:

xlsatoms | grep -i wacom
303     Wacom Tablet Area
304     Wacom Rotation
305     Wacom Pressurecurve
306     Wacom Serial IDs
307     Wacom Strip Buttons
308     Wacom Wheel Buttons
309     Wacom TwinView Resolution
310     Wacom Display Options
311     Wacom Screen Area
312     Wacom Proximity Threshold
313     Wacom Capacity
314     Wacom Pressure Threshold
315     Wacom Sample and Suppress
316     Wacom Enable Touch
317     Wacom Hover Click
318     Wacom Tool Type
319     Wacom Button Actions
430     Wacom Stylus
431     Wacom Cursor
432     Wacom Eraser

So it looks ok. Have you got idea how to fix it? It seems that it is Fedora issue, other Krita developers
have working tablet support out of the box in the OpenSuse. I checked if the tablet support is compiled in Fedora, it is.

Krita hackers are offering me CD of OpenSuse. I like my Fedora, I don’t give up so far…Please, help if you can ;)

Sven Langkamp has also this same problem as I do, he is also on Fedora 12 these days.

Update 28.2.2010:
I filled bugreport for Fedora https://bugzilla.redhat.com/show_bug.cgi?id=569132

Also for Qt http://bugreports.qt.nokia.com/browse/QTBUG-8599

UPDATE: It works now with some patch. Fedora will ship some update soon. Thanks to Thomas Zander for the patch and Fedora guys for providing me test build!

Cross-compile Qt4 app for Windows on Fedora 11

Tuesday, December 29th, 2009

I made school project in Qt4.5.3 and my teacher does not use Linux so I decided to try to cross-compile the project for her from Fedora 11. Here are the steps. Let’s hope it is useful for you too.

First you have to install mingw compiler, so I did something crazy like:

yum install mingw32*

That grabs everything related to mingw (installs Qt4 libs, compiler, qt-qmake specs files) on Fedora 11. Many unrelated libs are installed too (Gtk, …) – you have been warned.

Then you create Qt4 project file if you don’t have one already

qmake-qt4 -project

Pass the qmake specification:

qmake-qt4 -spec fedora-win32-cross

Run this so that QtGui is found

QMAKESPEC=fedora-win32-cross qmake-qt4 QT_LIBINFIX=4

Compile!

make

Then I found exe file in release/ directory. I wanted to distribute it so I needed to distribute some dlls too. To find out I run

i686-pc-mingw32-objdump -p prog.exe | grep dll

It lists all used dlls.I copied them from Fedora box to the same folder as the binary and I was done!

I used locate to find them (found in /usr/i686-pc-mingw32/sys-root/mingw/bin/). QtCore4.dll, QtGui4.dll and libgcc_s_sjlj-1.dll was needed for me.
I did not copied KERNEL32.dll, msvcrt.dll etc. Windows users usually have those files.

Then it worked for me. The app looked bad but worked as supposed to. In Wine it had some bug, but it worked on Windows XP.

Thanks for help to the fedora-mingw team at #fedora-mingw on freenode IRC ;)
https://fedoraproject.org/wiki/MinGW/Tips – related wiki page