Re: [Development] Windows plugin customisation: QWindowsKeyMapper

2022-08-02 Thread Laszlo Papp
I actually also tried this to no avail. Is it a Windows plugin or native
event filter bug that I cannot intercept alt+key presses? Or am I doing
something wrong?

#include 

#include 

#include 

#include 

#ifdef Q_OS_WIN
#include 
#endif

class MyMSGEventFilter : public QAbstractNativeEventFilter
{
public:
bool nativeEventFilter(const QByteArray &eventType, [[maybe_unused]]
void *message, long *) override
{
#ifdef Q_OS_WIN
if (eventType == "windows_generic_MSG"
|| eventType == "windows_dispatcher_MSG") {
MSG *msg = static_cast(message);
// This works
if (msg->wParam == VK_SPACE) {
   std::cout << "TEST SPACE" << std::endl;
}
// None of these work.
// else if (msg->wParam == WM_SYSKEYDOWN) {
// else if (msg->wParam == VK_MENU) {
else if (msg->wParam == VK_LMENU) {
   std::cout << "TEST ALT" << std::endl;
}
}
#endif
return false;
}
};

int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MyMSGEventFilter filterObject;
app.installNativeEventFilter(&filterObject);
QMainWindow mainWindow;
mainWindow.show();
return app.exec();
}
___
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development


Re: [Development] Windows plugin customisation: QWindowsKeyMapper

2022-08-02 Thread Laszlo Papp
Hi again,

I wrote this simple test bed, but it does not seem to work. It seems that
the windows plugin does not let me process the alt key after all? I can
process the space fine, but not the alt. Am I doing something wrong or the
windows plugin does not allow the api user to intercept the native events
via the intended native event filter?

#include 

#include 

#include 

#include 

#ifdef Q_OS_WIN
#include 
#endif

class MyMSGEventFilter : public QAbstractNativeEventFilter
{
public:
bool nativeEventFilter(const QByteArray &eventType, [[maybe_unused]]
void *message, long *) override
{
#ifdef Q_OS_WIN
// Does not work: if ((GetKeyState(VK_MENU) & 0x8000) &&
(GetKeyState(VK_SPACE) & 0x8000)) {
// Does not work: if (GetKeyState(VK_MENU) & 0x8000) {
// Does not work: if (GetKeyState(VK_LMENU) & 0x8000) {
if (GetKeyState(VK_SPACE ) & 0x8000) { // Works
  std::cout << eventType.toStdString() << std::endl;
}
#endif
return false;
}
};

int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MyMSGEventFilter filterObject;
app.installNativeEventFilter(&filterObject);
QMainWindow mainWindow;
mainWindow.show();
return app.exec();
}
___
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development


Re: [Development] Licensing of qtbase

2022-08-02 Thread Jörg Bornemann

On 7/16/22 12:00, Felix Crazzolara wrote:

I wanted now to write some CMake code to ensure that Qt is always and 
entirely linked dynamically. For that purpose, I intended to iterate 
through the target properties LINK_LIBRARIES and 
INTERFACE_LINK_LIBRARIES of Qt5::Widgets or Qt6::Widgets and check that 
all dependencies resolve to shared libraries eventually.


I have now two questions. First, is there some existing code in the Qt 
code base that does what I want already?


There is code for that as part of the .pri file generation, but it's not 
ready to be used outside of its scope.  See QtPriHelpers.cmake for details.


Secondly, I noticed that an interface dependency of Qt6::Widgets is 
Qt6::CoreQt6::Gui and if I check whether Qt6::CoreQt6::Gui is a target 
with "if (TARGET Qt::CoreQt6::Gui)", it turns out that it is not. This 
confused me since it doesn't seem like a valid library name to me. How 
can I resolve Qt6::CoreQt6::Gui to an absolute file path?


Qt6::CoreQt6::Gui looks wrong and should not appear as dependency.
Are you sure that this is not an artifact of your code that extracts the 
dependencies?



Cheers,

Joerg
___
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development


[Development] CI down for a while

2022-08-02 Thread Tony Sarajärvi
Hi

We hit a small SNAFU with the CI and we’re fixing it. Downtime depends all on 
the speed of the system sadly :/
It’s been fixing for 2 hours now and closing to its end. My estimate is an hour 
more of downtime.

-Tony
___
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development