cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
r.dorskiy
Visitor
Visitor
373 Views
Registered: ‎01-17-2019

[Zynq7000], Petalinux 2019.2, Qt 4.8 mouse doesn't work

Jump to solution

Greetings!

We're developing a device with a custom board featuring Zynq7000 with RGB video output into a 7 inch Waveshare LCD.

It runs linux created with petalinux 2019.2. Our system uses simple framebuffer to create a fb0 device predefined in device tree.

We've created a test build with matchbox package group to test our core design and it works fine: USB mouse and USB keyboard are connected via USB 2.0 hub and everything works perfectly fine. The GUI is drawn, the apps work and we can use it as a regular desktop manager.

Our end goal is to build a Qt application that draws a GUI on the said LCD and accepts touch input. Right now we're trying to make it work with keyboard and mouse as a starting point and we've got everything working except for the mouse.

We followed the instructions at https://xilinx.com/support/answers/59172.html to be able to build for our system. It's an old instruction and it utilizes Qt 4.8, which is perfectly fine since it requires only QtCore and QtGUI libs to run on the device.

Right now using this setup (building, copying libs and app into RAM and running it from there) works fine: the window appears, text input into dedicated field works fine, the mouse coursor appears but it doesn't move.

We can see the mouse event file at /dev/input/event0. If we use "cat" to view its contents, we can see the mouse data updated if we move the mouse or press its buttons. We thought thath maybe Qt was looking for the mouse input somewhere else, so we created symlinks for /dev/input/mice and /dev/input/mouse0. It changed nothing. We also tried to set some environment veriables like "QWS_MOUSE" and it also changed nothing.

What could be the reason for this? Is there something fundamentally wrong or maybe there's a newer guide to follow for the newest way to build Qt apps for petalinux Qt_base (version 5) in petalinux-package-groups? We'd be glad to recive any hints where to look for the solution. Also, we'd prefer to stick with Qt 4.8  for its simplicity if it's possible. The GUI doesn't have to have any fancy features, just some regular and radio buttons and lists with presets.

 

We'd appreciate any effort to help us.

Regards, R. Dorsky and the team.

0 Kudos
1 Solution

Accepted Solutions
r.dorskiy
Visitor
Visitor
250 Views
Registered: ‎01-17-2019

We've solved our issue. Qt looks specifically for /dev/input/mice and symplinking somehow doesn't do anything, we have to properly announce it in kernel config in order to make it work. Matchbox has its own ways of making the mouse work,it seems.

The solution for us was simple - we didn't specify it in kernel. To do so:

petalinux-config -c kernel

 

In menuconfig:

Device drivers --->

      Input device support --->

             [*] Mouse interface  // Select this option

             (1024)  Horizontal screen resolution // our H. res.

             (600)   Vertical screen resolution  // our V. res. 

 

After doing so any USB mouse attached works as intended with our custom app.

View solution in original post

0 Kudos
1 Reply
r.dorskiy
Visitor
Visitor
251 Views
Registered: ‎01-17-2019

We've solved our issue. Qt looks specifically for /dev/input/mice and symplinking somehow doesn't do anything, we have to properly announce it in kernel config in order to make it work. Matchbox has its own ways of making the mouse work,it seems.

The solution for us was simple - we didn't specify it in kernel. To do so:

petalinux-config -c kernel

 

In menuconfig:

Device drivers --->

      Input device support --->

             [*] Mouse interface  // Select this option

             (1024)  Horizontal screen resolution // our H. res.

             (600)   Vertical screen resolution  // our V. res. 

 

After doing so any USB mouse attached works as intended with our custom app.

View solution in original post

0 Kudos