AnyEvent::Impl::Qt(3)

πŸ’… AnyEvent::Impl::Qt

okay bestie, so this is the AnyEvent adaptor for Qt β€” yes, that Qt, the big fancy GUI one πŸŽ€ and it lives in AnyEvent::Impl::Qt(3), in case you were wondering where the manual name went (it's right here, bestie, folded in like a lil name tag 🫢).


✨ SYNOPSIS ✨

use AnyEvent;
use Qt;

my $app = Qt::Application \@ARGV; # REQUIRED!

# this module gets loaded automatically as required

like, that # REQUIRED! is not a suggestion, bestie 😭 please respect it.


🌸 DESCRIPTION 🌸

So this module provides transparent support for AnyEvent. The vibe is: you literally don't have to do anything to make Qt work with AnyEvent πŸ’– except β€” and this is the important part β€” loading Qt before creating the first AnyEvent watcher, and instantiating the Qt::Application object. That's it. That's the whole ritual πŸ•―οΈβœ¨

Failing to do that will result in segfaults πŸ’€ not a cute little error message, not a warning, a whole crash. Which is exactly why this model doesn't work as the default model, and it will not be autoprobed. (But it will be autodetected when the main program uses Qt, so like, it's got good instincts πŸ‘‘.)

Qt suffers from the same limitations as Event::Lib and Tk, and the workaround is also the same β€” duplicating file descriptors πŸŒ€ iykyk.

Qt doesn't support idle events, so they are being emulated 🧚 (we're doing our best, okay).

⚠️ Avoid Qt if you can. That's not me being dramatic, that's the manpage being dramatic. But also me. Seriously though β€” avoid Qt if you can. 😭

πŸ¦‹ SEE ALSO πŸ¦‹

  • AnyEvent β€” the main character, obviously πŸ‘‘
  • Qt β€” the one with the limitations πŸ’…

πŸŽ€ AUTHOR πŸŽ€

Marc Lehmann <schmorp@schmorp.de>
http://anyevent.schmorp.de

shoutout to Marc for writing this, fr fr 🫢


okay so that's the whole thing!! and a lil sign-off for the footer bits: this page comes from perl v5.42.0, dated 2019-09-18, and it's filed under AnyEvent::Impl::Qt(3) β€” so if you need to cite it, that's the ✨iconic✨ source and version. bye bestie, go instantiate that Qt::Application object before you do literally anything else πŸ’–πŸŒˆπŸ¦‹

πŸ“¦ where this page comes from