Skip to content

KDAB Blogs Get the RSS Feed

Stay up-to-date and get inspiration from KDAB’s expert insights into Qt, C++ and OpenGL development.
Our engineers and designers share cutting-edge technology news and ideas with regard to Qt, QML, Qt on Android, OpenGL, Qt 3D, Vulkan, Scalable UIs and more embedded, mobile and desktop-related topics.

How not to lose the alpha channel when converting between QRgb/QColor/QString

Working on color imagery for QiTissue recently, I realized we were accidentally losing the alpha channel in multiple places. For efficiency reasons, we keep colors in memory using the QRgb type, and convert that to/from QString for serialization purposes via QColor as needed. Here’s what I discovered about why that doesn’t work, and some ways […]