It can be used as an X11 window manager or a Wayland compositor.
Please refer to this discussion to see the current state of development of the Wayland backend.
Qtile currently has no package-specific USE flags.
Apply these USE flags before emerging Qtile:
echo x11-libs/cairo X glib opengl svg >> /etc/portage/package.use/qtile
Then emerge Qtile:
emerge --ask x11-wm/qtile
Qtile as a Wayland Compositor
Qtile requires dev-python/pywlroots, dev-python/pywayland, and dev-python/python-xkbcommon to be installed for Wayland support, however pywayland, and python-xkbcommon are dependencies of pywlroots hence emerging the latter is enough.
Emerge pywlroots :
emerge --ask dev-python/pywlroots
Support for X11 applications (XWayland)
Support for XWayland also requires gui-libs/wlroots and pywlroots to be built with XWayland support which at the time of writing pywlroots already do.
emerge --ask x11-base/xwayland
Start Qtile using a display manager or the startx command.
If want to use startx and want elogind support, setup ConsoleKit and create the following file:
exec dbus-launch --sh-syntax --exit-with-session qtile start
Qtile can be customized by editing the config file in ~/.config/qtile/config.py. This file is generated when there is no present configuration file. If Qtile is running while configuring it, restart Qtile using its default keybind, Super+Ctrl+R to apply changes.
The default configuration file can be found at https://github.com/qtile/qtile/blob/master/libqtile/resources/default_config.py.
To check if the changes are written correctly:
python3 -m py_compile ~/.config/qtile/config.py