I know of KHamburgerMenu which lets you turn an entire application menu into a hamburger menu with a simple toggle (Ctrl+m), and KCommandBar which takes only 5 lines of code to display a HUD-like search bar that shows you all menu entries in your application (Ctrl+Alt+i).
What are some KDE libraries you’ve seen that are very handy, yet are probably not very well known?
2 Likes
Some of these aren’t really unknown, but I feel like are easily glossed over:
- KCoreAddons. It has the really useful
KAboutData
, but also some hidden gems like KSandbox
to run host processes in Flatpak/Snap/etc.
- Solid is used in more places than you think, and is a pretty useful hardware interface library.
- KItemModels is one that every KDE developer should know (and use) as it has lots of built-in models that we use everywhere, and they’re even exposed in QML! Like
KSortFilterModel
.
- Extra CMake Modules is hands down probably the most useful thing for any Qt & CMake project, it’s not only for KDE software. Once you’ve read some of the modules, you end up finding parts of ECM everywhere because it’s that useful.
More cool libraries I became aware of recently:
- KSandBox, which lets you detect (and run things from) a snap/flatpak sandbox (oh oops, already mentioned XD).
- KWindowSystem, which has a collection of windowing system specific functionality (e.g. for X11 or Wayland). Especially useful if you want to change which feature is shown depending on whether you’re on X11 or Wayland.
- KIdleTime, which lets you detect whether the system is idle or not.
- KUnifiedPush, which lets you create (and publish) push notifications to a centralized server.