Results 1 to 4 of 4

Thread: QFontComboBox Delete font

  1. #1
    Join Date
    Mar 2015
    Posts
    11
    Qt products
    Qt3
    Platforms
    Windows

    Default QFontComboBox Delete font

    I'm creating font selection and I'm using QFontComboBox. Is there any possibility to delete MS serif in QFontComboBox list?

    TIA

  2. #2
    Join Date
    Apr 2013
    Location
    Prague
    Posts
    258
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    3
    Thanked 65 Times in 59 Posts

    Default Re: QFontComboBox Delete font

    QFontComboBox is a combo box. Therefore, removeItem() should remove an item from it. Number of fonts in the combo box should be provided by count(). You can traverse the combo box using indexing and search the unwanted fonts using, for example itemText().

  3. #3
    Join Date
    Mar 2015
    Posts
    11
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: QFontComboBox Delete font

    if I delete the index "60" using removeItem(60). the next index will be delete because of changing of index. how can I fix that?

  4. #4
    Join Date
    Sep 2015
    Posts
    50
    Qt products
    Qt5
    Platforms
    Unix/X11
    Thanks
    8

    Default Re: QFontComboBox Delete font

    Quote Originally Posted by romzxlat View Post
    if I delete the index "60" using removeItem(60). the next index will be delete because of changing of index. how can I fix that?
    It's a zero-based index. Try 59.

Similar Threads

  1. Font Height and width based on font size
    By Ghufran in forum Qt Programming
    Replies: 1
    Last Post: 31st July 2010, 09:02
  2. [SOLVED] QFontComboBox signals
    By ale6111 in forum Newbie
    Replies: 2
    Last Post: 30th July 2010, 15:06
  3. Stylesheets and QFontComboBox Sub-control
    By been_1990 in forum Qt Programming
    Replies: 2
    Last Post: 4th June 2010, 19:53
  4. Replies: 4
    Last Post: 19th February 2009, 12:10
  5. font incorrectly show - font break.
    By sgh in forum Qt Programming
    Replies: 9
    Last Post: 30th May 2008, 03:35

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.