Unsolved two cursors when run qt application
-
hi All:
i meet a problem, my application works well on ubuntu(only one cursor), when it runs on raspberry, there are two cursors,one is black(seems for the desktop), and the other is white, only i move the white cursor to the button(with mouse), then press the button with finger, the application will response correctly, if not so, there is no response. however if i click the button with mouse , the application also works well, is there any good ideas? because it's unacceptable to move the cursos with the mouse everytime before finger press, as the screen is touch panel. -
Hi,
Please add some basic information like what version of Qt you are using, what backend etc.
-
@SGaist
thanks for you tips,
update info:
my qt version is Qt5.7.1, target host, raspberry pi3, QT 5.7.1 is cross complied on host.
my application is simple, when click button, display a page and do something. then click the button on popup page and display another,
current issue, with mouse everything is ok, but with finger it can't work.
as the cursor can't move to the correct place , if i drag the cursor to the button, and click with finger, it will work.
any ideas ? thank you ! -
Did configure you application to get mouse event from the touch screen ?
-
@SGaist
thank you for your reminding , the application is enabled to get click event from mouse. should i set something special to get mouse event from the touch screen ?
By the way, without set any special attribute and property(without setting Qt::WA_AcceptTouchEvents property , Qt::AA_SynthesizeTouchForUnhandledMouseEvents and Qt::AA_SynthesizeMouseForUnhandledTouchEvents ) , shouldn't the widget treat the touch event as mouse event? -
Usually tslib is used to get touchscreen event.
-
@SGaist
i have installed tslib already,
the application is developed with another touchscreen, and it works correctly, then i try to run the application with a bigger touchscreen, the issue happened,
should i reinstall the tslib? my QT is crossed complied.
current issue: the cursor can't move when the finger touches, but it will move if i use the mouse, so if i move the cursor to the right place, then press with finger, it will invoke the click event. -
Did you reconfigure it to answer she has all data.Calibration... Not configuration...
[edited: SGaist]
-
@SGaist
sorry, what's your meaning of reconfigure it to answer she has all data? -
Sorry, there's been a glitch.
I meant, did you re-calibrate Tslib to match your new screen ?
-
@SGaist
very sorry, it seems i haven't install the TSlib..., i will install it any sync it to my host, then reinstall my QT.
and from the refer of this info:
http://doc.qt.io/qt-5/embedded-linux.html
it seems there is no need to install TSlib, as my touchscreen support multi-touch, and it is new version.
anyway i will try the following steps:
install Qt5.7 on my raspberry pi 3 with cross compile method following the steps :http://wiki.qt.io/RaspberryPi2EGLFS.
install Tslib and calibrate it on rp3 directly before sync rpi to host .
when reinstall QT , should i take steps to enable(combine) Tslib into QT? -
There's a plugin for tslib so yes you should check that it is built.
-
@SGaist
well ,i drop it now, with another touchscreen , it also works well.
thank you ! -
What do you mean by "drop it now" ?