Results 1 to 3 of 3

Thread: QComboBox::insertSeparator(int index) is not working

  1. #1
    Join Date
    Nov 2008
    Posts
    21
    Thanked 1 Time in 1 Post

    Default QComboBox::insertSeparator(int index) is not working

    Hi,

    I've tried the insertSeparator method on the QComboBox but it seems not to work (it just does not insert the separator at all), anyone an idea?

    Qt 4.4.3
    Windows XP

    Code:
    Qt Code:
    1. #include "comboboxtest.h"
    2.  
    3. ComboBoxTest::ComboBoxTest(QWidget *parent, Qt::WFlags flags)
    4. : QMainWindow(parent, flags)
    5. {
    6. ui.setupUi(this);
    7.  
    8. ui.m_comboBox->insertItem(0, "item1");
    9. ui.m_comboBox->insertItem(1, "item2");
    10. ui.m_comboBox->insertItem(2, "item3");
    11. ui.m_comboBox->insertItem(3, "item4");
    12.  
    13. ui.m_comboBox->insertSeparator(2);
    14. }
    15.  
    16. ComboBoxTest::~ComboBoxTest()
    17. {
    18.  
    19. }
    To copy to clipboard, switch view to plain text mode 
    Attached Images Attached Images

  2. #2
    Join Date
    Jan 2006
    Posts
    132
    Thanked 16 Times in 16 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QComboBox::insertSeparator(int index) is not working


  3. #3
    Join Date
    Jun 2008
    Location
    Boulder, Colorado, USA
    Posts
    70
    Thanks
    16
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QComboBox::insertSeparator(int index) is not working

    FWIW ... Using Qt 4.6.3, QComboBox separators -- using the QComboBox::insertSeparator(int index) method -- ARE working for me on Windows (XP), but they aren't showing up on Solaris.

    (BTW, unfortunately, the URL provided in the prior response is no longer valid).

Similar Threads

  1. Replies: 3
    Last Post: 25th July 2008, 14:30
  2. Replies: 1
    Last Post: 13th June 2008, 18:58
  3. GUI thread and Working thread comunication
    By FasTTo in forum Qt Programming
    Replies: 2
    Last Post: 13th September 2007, 15:31
  4. Qtopia core 4.2.2 cross compile make error
    By smiyai18 in forum Installation and Deployment
    Replies: 2
    Last Post: 28th August 2007, 17:04
  5. Qt and MySQL Database Connection
    By shamik in forum Qt Programming
    Replies: 41
    Last Post: 6th October 2006, 12:48

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.