且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在 QtQuick Shortcut 中处理修饰符

更新时间:2023-12-04 20:23:28

我认为没有办法在 Windows 上执行此操作,如果您正在测试的话.这也是我的应用程序的一个问题,用户应该能够按住 Alt 来使用颜色选择器.不过在 macOS 和 Ubuntu 上运行良好.

I don't think there is a way to do this on Windows, if that's where you're testing. It's been a problem for my application too, where the user should be able to hold Alt to use a colour picker. Works fine on macOS and Ubuntu though.

我的猜测是,它与 alt 是在 Windows 上激活菜单项的全局快捷方式有关.虽然 Ubuntu 也是如此,但它在那里运行良好.

My guess is that it has something to do with alt being a global shortcut for activating menu items on Windows.. though the same is true for Ubuntu, and it works fine there.

这似乎是一个问题,例如Windows 上的 Photoshop 也是如此,有几个常见的技巧可以解决这个问题:

It seems to be an issue for e.g. Photoshop on Windows as well, with several common hacks to work around it: