From patchwork Mon Sep 10 12:34:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Question: exporting QWS_KEYBOARD=LinuxInput:/dev/input/event0" hang application Date: Mon, 10 Sep 2012 02:34:03 -0000 From: Thomas Petazzoni X-Patchwork-Id: 182868 Message-Id: <20120910143403.48f87840@skate> To: Belisko Marek Cc: buildroot Le Mon, 10 Sep 2012 11:08:54 +0200, Belisko Marek a écrit : > I know this isn't related to buildroot but maybe somehow have same troubles. > I've build simple buildroot rootfs (2012.08 based) with QT4.8.2, my > small qt application > and dropbear. > > I can start my application and it is working fine. When need to add > keyboard handling > from USB keyboard application hang (with no useful data in console) that way: > export QWS_KEYBOARD="LinuxInput:/dev/input/event0" ./app -qws > > I've double check qt configuration and linuxinput is checked. > Anybody have same troubles? I remember having problems with Qt as soon as I started defining QWS_KEYBOARD, but I don't remember if the problem was exactly the one you had. Can you try to add the attached patch to the Qt package? It has been written for Qt 4.7.3, but since the patch is trivial, I guess it can be quickly adapted to Qt 4.8.2. It's the patch I had to fix the problem I encountered, but again I don't remember the exact problem, and I have been apparently too lazy to describe it in the patch description. Best regards, Thomas --- qt-4.7.3.orig/src/gui/embedded/qkbdlinuxinput_qws.cpp 2011-03-30 07:19:04.000000000 +0200 +++ qt-4.7.3/src/gui/embedded/qkbdlinuxinput_qws.cpp 2011-09-12 18:22:52.978846803 +0200 @@ -127,7 +127,7 @@ // play nice in case we are started from a shell (e.g. for debugging) m_tty_fd = isatty(0) ? 0 : -1; - +#if 0 if (m_tty_fd >= 0) { // save tty config for restore. tcgetattr(m_tty_fd, &m_tty_attr); @@ -154,6 +154,7 @@ cfsetospeed(&termdata, 9600); tcsetattr(m_tty_fd, TCSANOW, &termdata); } +#endif } else { qWarning("Cannot open keyboard input device '%s': %s", qPrintable(dev), strerror(errno)); return;