Results 1 to 5 of 5

Thread: QComboBox: disabling an item in the combobox menu

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Thanks
    14
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Re: QComboBox: disabling an item in the combobox menu

    @high_flyer: it means they can be seen in the menu when the combobox clicked but somehow can't be selected by users. I wonder the somehow part..ok now?

    @tbscope: I wish I could remove them, but it won't work for me. I think they should be seperate classes so that they can be modified in an agile way just like QListWidget item.

    Maybe css solve the problem which I don't think so.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QComboBox: disabling an item in the combobox menu

    I too think that the proper way is through a custom delegate.
    CSS or style sheets will only change the look and feel but not the behaviour.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. Add close button in In Combobox item.
    By akram.halder in forum Qt Programming
    Replies: 2
    Last Post: 12th August 2010, 12:09
  2. Disabling options in a combobox
    By the goat boy in forum Qt Programming
    Replies: 3
    Last Post: 21st July 2008, 18:37
  3. combobox and item colors
    By zorro68 in forum Qt Programming
    Replies: 16
    Last Post: 23rd September 2007, 12:54
  4. Retrieve userData of a comboBox item
    By jiveaxe in forum Newbie
    Replies: 6
    Last Post: 23rd August 2007, 10:28
  5. Can Qtable Item be a comboBox?
    By iGoo in forum Qt Programming
    Replies: 2
    Last Post: 4th August 2006, 09:58

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
  •  
Qt is a trademark of The Qt Company.