PDA

View Full Version : Help ComboBox and Model



weepdoo
15th November 2008, 13:29
Hy,

I'm a bit new to c++ and Qt, and I would like to build a simple app that use a model, with combo box.

Here is a simple code that I wrote (in attachement).

The problem is that combobox are not populated correctly (the icon is correct on my mac, but when I clic on it, it's all wrong).
But the tree view is correctly populated.

What I did wrong ?
Thanks

caduel
15th November 2008, 18:05
could you please explain what "wrong" means?
what should your program do? what does it do?
(I tried it and did not right away see faulty behaviour. On the other hand, I don't really want to guess what you wanted to do....)

weepdoo
15th November 2008, 18:50
I would like to have the 3 combo box that manage the 3 first level of the DirModel, and the fourth one managed by the tree view.

My problem is that on my mac, the app is quiet correctly init: the combo have the correct icon and correct label and the tree view represent the correct fourth stage (see the testCombo picture).

My problem is that when I click on a combo (whatever) the list that appeared represent only the root of the model (with the QDirModel it's only the '/') (see the testCombo2 picture).

I really don't know why...