News for hackers. Stuff that matters.

Ask HN: Implement a webservice GUI with Qt?

I have a webservice for which I want to build a GUI. I was initially considering doing it in electron but am now wondering if I could simply use Qt to build my GUI?

Qt would be making REST api calls to the backend service(which could be running locally or remote) to populate the UI.

( 3 comments | 4 points | on HN )
Re:Ask HN: Implement a webservice GUI with Qt? by terminalcommand on Friday March 23, 2018 @01:41AM (#16655380)
This could be easily achieved. QT does not require you to change the way you code, you can design a UI in QT designer, add the buttons, callbacks etc. . Then export it as a uic file. Then use a converter of that uic file to your programming language of choice, import it, fill the callbacks and be done with it.

It's 90% automated and visual.

I'd recommend coding a basic text-only (just print statements) interface first, then bind it to the QT GUI.

If you'd like a more modern looking UI, also check out QML.

Have fun :)

Re:Ask HN: Implement a webservice GUI with Qt? by mon1key on Friday March 23, 2018 @01:54AM (#16655451)
okay so another question, so in theory I could keep a common backend code and experiment with Qt frontend code even as I simultaneously build with electron as well?
Re:Ask HN: Implement a webservice GUI with Qt? by terminalcommand on Friday March 23, 2018 @04:15AM (#16656019)
That is correct. This is one of the benefits that come with choosing the server-client architecture. Backend is decoupled from the frontend (e.g. UI).