Unsolved Loading custom mouse driver
-
Developed custom mouse driver and generated libourmousedriver.so. copied that to plugin directory where qt was installed.
Developed a application to get those mouse events but not able to get see any output as well as events from custom mouse driver.
I did:
export QWS_MOUSE_PROTO=ourmousedriver:/dev/input/event0.
Please help me on this.
-
Hi and welcome to devnet,
Which version of Qt are you using ?
-
i am using qt 4.8.5
-
You should start your application with the
QT_DEBUG_PLUGINS
environment variable set to 1 to see what is happening with your plugin.One a side note, are you locked to that old version of Qt ? If locked to Qt 4 then please at least upgrade to Qt 4.8.7 which is the latest and last release of the Qt 4 series otherwise you should seriously consider moving to Qt 5.
-
Great Thanks for pointing me to enable debug plugins.
I am getting error message that could not able to load the plugin
undefined symbol: _ZTV20<my class name>
what does it mean?
I have given Q_EXPORT_PLUGIN2(driver class, pluginclassname);
-
Can you share the .pro file of your plugin project ?
-
QT += core gui
TARGET = mousedriver
TEMPLATE = lib
CONFIG += pluginDESTDIR = ~/home/
SOURCES+= mousedriver.cpp
HEADERS+= mousedriver.h
INSTALLS+ = target
mousedriver.cpp:
class mousehandler: public qobject, public QWSMouseHandler {
}
class mousehandlerdriverplugin: public QMouseDriverPlugin {
}
Q_EXPORT_PLUGIN2(mymousedriver, mousehandlerdriverplugin)
keys function:
QStringList() << "mymousedriver"; -
Maybe a silly question but did you install the plugin properly ?
-
created a home directory
and copied plugins, necessary library needed for qt application.
my application runs..mouse pointer not moving and now trying to add my mouse driver plugin.
since my device is space constraint so only copied gui, core, qt, network.so files and plugins
-
Where did you copy your custom mouse input plugin ?
-
Created a /usr/local/qt4.8/lib
/usr/local/qt4.8/plugins
the above ones are symbolic linkplugins -> /media/plugins/mousedrivers/
lib -> /media/lib/lib*media directory has libs and plugins.
-
Why not install it along the other Qt plugins ?
-
Tried with full install. but still not loading
-
Did you check again with
QT_DEBUG_PLUGINGS
set to 1 ? What did you get ?