Re: [Development] Windows plugin customisation: QWindowsKeyMapper
Thanks - it has helped! I need to return true when I want Qt to stop processing the events further. But I would not like to do so for everything unconditionally. Do you know how I can extend this example code to handle e.g. alt+space to return true for it? I assume this would mean writing Windows platform specific code in my event filter. Does anyone have Windows API experience to show that? (This is also the reason why I prefer to have a solution, like an opt-in option to avoid having to write platform specific code in a Qt application. This example probably demonstrates that why this would be preferable in the longer-term) ___ Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development
Re: [Development] Windows plugin customisation: QWindowsKeyMapper
On 2022-08-02 00:07, Laszlo Papp wrote: #include #include #include class MyMSGEventFilter : public QAbstractNativeEventFilter { public: bool nativeEventFilter(const QByteArray , [[maybe_unused]] void *message, long *) override { std::cout << eventType.toStdString() << std::endl; #ifdef Q_OS_WIN if (eventType == "windows_generic_MSG") { MSG *msg = static_cast(message); } else if (eventType == "windows_dispatcher_MSG") { MSG *msg = static_cast(message); } #endif return false; } }; int main(int argc, char *argv[]) { QApplication app(argc, argv); MyMSGEventFilter filterObject; app.installNativeEventFilter(); return app.exec(); } Hi, it works fine on Windows, but without a (hidden) window on the desktop you're doomed to receiving *very few* message. I.e. no HWND (that's why for example the DDE server creates a hidden window on the desktop). So easiest workaround is to add say a QWidget window: ... QApplication app(argc, argv); MyMSGEventFilter filterObject; app.installNativeEventFilter(); MainWindow w; w.show(); // you can hide it now return app.exec(); ... BTW, I couldn't get it to compile on MSVC 2019 Qt 6.3.1 ("MyMsgEventFilter: cannot instantiate abstract class") but on MSVC 2019 5.15.2 it works fine. ___ Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development
Re: [Development] Windows plugin customisation: QWindowsKeyMapper
Hi again, I wrote this example program, but it does not seem to work. The filter is never hit on Windows even though I copied the qwindow.dll to the platforms directory of my build tree. Do you know this would not work on Windows? The filter is hit on Mac and Linux. Thanks. Kind regards, László #include #include #include class MyMSGEventFilter : public QAbstractNativeEventFilter { public: bool nativeEventFilter(const QByteArray , [[maybe_unused]] void *message, long *) override { std::cout << eventType.toStdString() << std::endl; #ifdef Q_OS_WIN if (eventType == "windows_generic_MSG") { MSG *msg = static_cast(message); } else if (eventType == "windows_dispatcher_MSG") { MSG *msg = static_cast(message); } #endif return false; } }; int main(int argc, char *argv[]) { QApplication app(argc, argv); MyMSGEventFilter filterObject; app.installNativeEventFilter(); return app.exec(); } > ___ Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development
Re: [Development] How to do deprecation
I wrote: >> TL;DR: there's a new [[Deprecation]] wiki page, please review. Friedemann Kleint (1 August 2022 09:49) replied: > It misses an important part, IMO: > Try to get an idea of the impact of your planned deprecation by building > all of Qt and ideally Qt Creator (producing patches fixing the > deprecation warnings). > > If that turns into an huge exercise taking several days, it becomes > clear that the deprecation is not feasible. Fair point. I have expanded the last paragraph of the introduction (which touched on this, at least) - please review, Eddy. ___ Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development
Re: [Development] How to do deprecation
Hi, > TL;DR: there's a new [[Deprecation]] wiki page, please review. It misses an important part, IMO: Try to get an idea of the impact of your planned deprecation by building all of Qt and ideally Qt Creator (producing patches fixing the deprecation warnings). If that turns into an huge exercise taking several days, it becomes clear that the deprecation is not feasible. Regards, Friedemann -- Friedemann Kleint The Qt Company GmbH ___ Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development
[Development] Monthly CI maintenance break - August (Mon 8th Aug 2022)
Hi all! We’ll have our scheduled maintenance break on next Monday (8th of August). We’ll begin our work at 5:00 UTC and you can prepare for 6 hours of CI not working. Br, VP ___ Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development