Results 1 to 3 of 3

Thread: Help ComboBox and Model

  1. #1
    Join Date
    Jul 2006
    Location
    France
    Posts
    34
    Thanks
    12
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Question Help ComboBox and Model

    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
    Attached Files Attached Files

  2. #2
    Join Date
    Dec 2006
    Posts
    849
    Thanks
    6
    Thanked 163 Times in 151 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Help ComboBox and Model

    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....)

  3. #3
    Join Date
    Jul 2006
    Location
    France
    Posts
    34
    Thanks
    12
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Help ComboBox and Model

    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...
    Attached Images Attached Images

Similar Threads

  1. How to populate delegate with model data.
    By kaushal_gaurav in forum Qt Programming
    Replies: 2
    Last Post: 4th August 2008, 09:31
  2. Combobox with checkable items
    By qtneuling in forum Qt Programming
    Replies: 1
    Last Post: 5th July 2008, 14:42
  3. Replies: 2
    Last Post: 18th March 2008, 15:38
  4. Replies: 1
    Last Post: 16th November 2007, 12:06
  5. ComboBox with QSqlTableModel
    By musti in forum Newbie
    Replies: 3
    Last Post: 9th November 2007, 23:49

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.