Page 1 of 1

GUI with C

Posted: Fri Jan 08, 2016 10:03 am
by VSWizzard
Hello dear Raspberry-Fans

Can you recommend me a good program to create a GUI on the Raspberry Pi 7" Touchscreen, where you can easy communicate with the GPIO from the Raspberry Pi B+? Thing is we want to make a GUI for a quiz-game we work on at the moment. And for example if a high-signal is detected on an input-port, we want to change something on the screen, for example a countdown starts on the screen.

Looking forward to your answers.

Sincerely VSWizzard.

Re: GUI with C

Posted: Fri Jan 08, 2016 10:19 am
by rurwin
There's two ways.

You could use a web browser with a local server and create the pages in a Python program.

You could build it as a normal C GUI application using a toolkit such as QT (which is installed as standard IIRC.)

It depends on what other features you need and where your skill-set lies.

Re: GUI with C

Posted: Fri Jan 08, 2016 10:26 am
by ShiftPlusOne
Using Qt with C would be fairly tricky. I think it would have to be GTK or wxWidgets instead.

Re: GUI with C

Posted: Fri Jan 08, 2016 11:11 am
by rurwin
Sorry, I tend to use "C" as a general class. QT is fine with C++, but yes you would struggle with C. I've used wxWidgets in Python and it's not a bad system, but it is C++ as well.

Re: GUI with C

Posted: Fri Jan 08, 2016 12:36 pm
by VSWizzard
Thank you for the answers

It's not so important to use C for this. We can also do it with Python. Things we need to make is: we want to use the display only to show our questions of the quiz with the answers and a countdown of 10 seconds where you have time to choose your answer. We have made controllers. These controllers are telling the answers of the people to another device, we learnt programmig with. The Raspberry tells the correct answer to the other programming device (only used in Switzerland for education, i think).

Thank you for your attention ;)

Re: GUI with C

Posted: Fri Jan 08, 2016 1:08 pm
by ShiftPlusOne
Then maybe kivy + python?

Re: GUI with C

Posted: Mon Jan 11, 2016 11:16 am
by yasriady

GUI application devel for raspbery pi, I'm using using wxWidgets.
It's flexible in licensing scheme and yield portable application by statically linking.
This ui framework is very complete, not just ui, but also for stream, filesystem, string and etc ... just like what qt does....

Please check my experience using wxWidgets on following link: ... chain.html


Re: GUI with C

Posted: Mon Jan 11, 2016 7:38 pm
by pxgator
If you want to do GUI the easy way check this out:


Re: GUI with C

Posted: Wed Jan 13, 2016 7:52 am
by VSWizzard
Thanks for the answers,

can you tell me if the following would work with Tkinter?
Please see the appendix.
We want to program our Quiz, so that 3 Windows pop-up with a text on it and when the GPIO's give a signal to the raspberry, it should switch the screen. That's one case I don't know how to do.

Thank y'all

Re: GUI with C

Posted: Wed Jan 13, 2016 1:33 pm
by RogerW
I am not sure if this will help but it might.
This is a python/tkinter program that shows different aspects of system performance (a bit like task manager). It does this by switching windows. In this case I use a menu but you might be able to use the same idea but using the GPIO to make the windows swap.