Search code examples
c++cqmlncursesqt-quick

Using QML for creating curses applications


There's a presentation (video, slides) that demonstrates the use of QML in developing ncurses applications.

I've searched everywhere, but I couldn't find any documentation on the subject, does anyone have any idea on how to achieve what was done in the presentation?


Solution

  • Qt can be (Ncurses and Qt Interoperability) used to handle the async I/O details of an ncurses app even without QML nor any other high-level frameworks.

    You could also expose some C++ class framework for text interfaces via QML. For example, as was done in the presentation, you could expose CDK - the Curses Development Kit to QML.

    I couldn't find the code from the presentation, but re-implementing it shouldn't be too hard. All you do is wrap CDK objects in QObjects, properly exposing the properties as Qt properties.