PDA

View Full Version : LED Matrix



jwflammer
22nd February 2011, 22:44
Hi im new to QT creator 2.0 and well i have built a virtual led matrix and well im having trouble getting any thing to work how do i change the frame's background color when i click one of the buttons and further more how do i get a slot to work properly? 5977

thanks John

ChrisW67
23rd February 2011, 01:23
Open Assistant (or help in Qt Creator) and read Signals and Slots (http://doc.qt.nokia.com/latest/signalsandslots.html). Also, run the Qt Demo Launcher (qtdemo) and have a look at some of the examples and their code. You will also need to know some C++ before you will get too much further.

Start by getting the code to compile ;)
Add something to declare and define a slot that can change the colour. There are plenty of examples in the documentation for creating slots.
Connect something to that slot. Again, plenty of examples in the docs.

As for actually changing the frame colour you could use Qt Style Sheets (http://doc.qt.nokia.com/latest/stylesheet.html) but there is definitely more than one way to do this.