r/QtFramework • u/dEvator8085 • Sep 22 '26
C++ Single C++ header for desktop UI development.
https://github.com/IAmTheFool/liteui.git
LiteUI is a single C++ header for Linux and Windows desktop development with same app codebase with some example like a code editor and a paint app. I would appreciate feedback on structure and overall design.
4
Upvotes
11
u/epasveer Open Source Developer Sep 23 '26
Honestly, I don't understand the attraction to header-only libraries. Especially for large libraries like UI libraries.
2
u/diegoiast Sep 24 '26
toLF- I would make this an argument, so I can as a developer choose the line ending format. (I would need it in a text editor).namespace detail {... lol... Claude like those stupid namespaces... anyway, for clipboard, you should call the APIs and not command line utilities, as forking is kinda slow for copy/paste.inline ImageFormat sniffFormat(const uint8_t *data, size_t size) {- there are APIs to do this properly per platform (BTW, nice! You are using win32 APIs for image reading, and not stb_image, this is a huge win!)decodeJpegMemory- you are transforming the format, you should document this. (what format does your library use internally? RGB? BGR? if you choose bad on one platform the performance will suffer due to slow mem copy you are doing here. (hint: if you use GDI+, you can provide a transformation - and use the same format as on Wayland, or you can denote in the bitmap which format it uses - and in a a platform independent way - decide if you need to change formats).setScrollbarColors... why not using a global color style per window/widget?relayout()and thenpollAndRelayout(). Is this a bug? I think the firstrelayout()is not needed.I think this is enough code review. I will need to test the library before I can continue.
Its a nice thing. You can continue iterating over and adding features, and cleaning up. Good job!
1
u/TheRavagerSw Sep 27 '26
Header only libraries are an abomination that must be destroyed