PDA

View Full Version : Making a QDropBox show a list contents



alitoh
25th April 2011, 22:12
Hello,


I'm trying to understand events and such.

I have a dialog window and a QGroupBox. I added a QDropBox to the QGroupBox and now I want to, onClick, display a QList's content.

That is, I have a QList<Colours> * colorList; with 10 colours in it. I want, on Click over the DropBox, to show all those colours and be able to select one from that displayed list. (When you use an installer and you select the language, that the box rolls back and the chosen option (language) only is shown? That's what I want to do)

The thing is, I have no idea where (how) to begin. I can't find an online guide to events or something like that. I'm guessing I will need something like an OnMouseClickOnMyDropBox function that works as an event, but no Idea who should give the call to that event, how, etc.

I don't know if I'm clear on this, I understand what I need, but I don't really know how to resolve this "events" issue.

Thanks for your help.

alitoh
26th April 2011, 14:23
Erratum;

Where it says "QDropBox", please read "QComboBox". I was burnt out and was confusing QT with another framework. I can't seem to edit my original post, so I will just clarify it here.