Results 1 to 7 of 7

Thread: QCombobox remove checkbox

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #7
    ucomesdag Guest

    Default Re: QCombobox remove checkbox

    Quote Originally Posted by marcel View Post
    Could you post an example reproducing the problem?
    Or at least a portion of your code? For example, where do you create and initialize the combo box.

    AFAIK, Jpn did something like this( a custom combo with checkable items ), just because it did not existed by default.

    So, I say it again, it is pretty weird.
    Check this out: http://jpnurmi.kapsi.fi/blog/2007/07...-2007/#respond

    Regards
    The original code:
    Qt Code:
    1. QComboBox comboBox = new QComboBox(this);
    2. comboBox ->setGeometry(geometry);
    3. comboBox ->setEditable(false);
    4. comboBox ->setFrame(false);
    5. comboBox ->setMaxVisibleItems(itemsCount);
    6. comboBox ->view()->setMinimumWidth(width);
    To copy to clipboard, switch view to plain text mode 
    This fixed the check box thing but has some weird scroll issues:
    Qt Code:
    1. QListView *view = new QListView;
    2. view->setAutoScroll(false);
    3. view->setMinimumWidth(width);
    4.  
    5. QComboBox comboBox = new QComboBox(this);
    6. comboBox ->setGeometry(geometry);
    7. comboBox ->setEditable(false);
    8. comboBox ->setFrame(false);
    9. comboBox ->setMaxVisibleItems(itemsCount);
    10. comboBox ->setView(view);
    To copy to clipboard, switch view to plain text mode 
    Btw. The parent widget has setStyle(QStyleFactory::create("plastique"));
    Attached Images Attached Images
    Last edited by ucomesdag; 1st August 2007 at 02:03.

Similar Threads

  1. QSettings again ... how to remove array elements
    By Mike in forum Qt Programming
    Replies: 4
    Last Post: 11th January 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.