Close

Widgets. Black Magic, kinda

A project log for explorad

Work in progress: The explorad combines a microcontroller, a display, and star charts in a head-up display for astronomical telescopes.

christophChristoph 05/12/2014 at 08:330 Comments

What do I expect from a widget library for microcontrollers like that small Teensy's Cortex-M4? Current state is "I expect more than I have", and I think the biggest problem is that I'm thinking inside the Qt4 box - Qt4 was the first widget system I ever used. I just hope I'm not going to write layout classes, that would certainly be a mess.

The hardest part so far is focus management. Where do my Button inputs go? I can't just let anything have focus and let it pass ignored inputs to its parent. Why? Because I want to highlight a button when it is selected, not the label which is part of the button composition.

That said, I figure that focus management doesn't need to be "efficient" regarding CPU usage. It doesn't really matter how long it takes to figure out which widgets gets focus, because focus usually only changes when there's some user input. That's a slow thing.

Discussions