code:
bool tray::nativeEventFilter(const QByteArray &eventType, void *message, long *)
{
qDebug("tray::nativeEventFilter:%s\n", eventType.data());
if (eventType == "xcb_generic_event_t") {
xcb_generic_event_t* ev = static_cast<xcb_generic_event_t *>(message);
// ...
}
return false;
}
Tag Page: /home/test/Downloads/tray/tray/tray.cpp:244: error: unknown type name ‘xcb_generic_event_t’
Outcome:
../tray/tray.cpp:244:9: error: ‘xcb_generic_event_t’ was not declared in this scope
xcb_generic_event_t* ev = static_cast<xcb_generic_event_t *>(message);
^~~~~~~~~~~~~~~~~~~
../tray/tray.cpp:244:9: note: suggested alternative: ‘xGenericEvent’
xcb_generic_event_t* ev = static_cast<xcb_generic_event_t *>(message);
^~~~~~~~~~~~~~~~~~~
xGenericEvent
Solution: #include <xcb/xcb.h>
Reference: https://codesearch.isocpp.org/actcd19/main/c/clementine/clementine_1.3.1+git609-g623a53681+dfsg-1/3rdparty/qxt/qxtglobalshortcut_x11.cpp
Read More:
- [Solved] error: ‘CV_GRAY2BGR’ was not declared in this scope
- [Solved] MIT cheetah make error: ‘ioctl’ was not declared in this scope
- How to Solve Error:‘itoa’ was not declared in this scope
- [Solved] Keil error: #101: “name“ has already been declared in the current scope
- [Solved] OpenCV ERROR: The minSdk version should not be declared in the android manifest file
- Tensorflow Error polling for event status: failed to query event: CUDA_ERROR_ILLEGAL_ADDRESS
- Go declares that the local variable does not use command line arguments. Main. Go: 4:6: a declared but not used
- [Solved] PCH Warning: header stop not at file scope
- Module not found: Error: Can‘t resolve ‘sass-loader‘ in…
- [Solved] Vscode Error: “export ‘default‘ (imported as ‘VueRouter‘) was not found in ‘vue-router‘
- [Solved] Vue3 Error: export ‘createRouter‘ was not found in ‘vue-router‘
- Error generic_INTERNAL_Error (65536) processing [How to Solve]
- Echars 5.0 Import Error: “export ‘default’ (imported as ‘echarts’) was not found in ‘echarts’
- [Solved] A needed class was not found. This could be due to an error in your runpath. Missing class: scala/co
- An error was reported when Maven package was running the packaged jar package: there is no main list attribute in xxx.jar, which can be solved by configuring Maven plugin
- [Solved] SpringMVC Error: element web-app must be declared
- Module not found: Error: Can‘t resolve ‘sass-loader‘
- Vue3 Warning: [Vue warn]: Extraneous non-emits event listeners (changeParentProps) were passed to component
- Error c4996: ‘getversionexa’: declared rejected [How to Solve]
- error: field ‘XXX’ declared as a function [How to Solve]