Results 1 to 4 of 4

Thread: QComboBox does not resize with setModel()

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2007
    Posts
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question QComboBox does not resize with setModel()

    I am using Qt version 4.3.1

    I create a QComboBox with the QComboBox::AdjustToContents property set. The problem is that the size of the combobox is not adjusted when I change the model with setModel() after the combobox is displayed. Calling update() or adjustSize() after setModel() also do not work.

    The only thing that seems to work is to insert and remove a dummy item, but that doesn't look very smart...

    Can anyone tell me if there is a better way to tell QComboBox to adjust its size after a model change?

    Thanks in advance.
    Last edited by Wim; 4th December 2007 at 06:04.

Similar Threads

  1. QComboBox drop list button events
    By maird in forum Qt Programming
    Replies: 5
    Last Post: 20th October 2007, 19:25
  2. postponing resize event
    By Honestmath in forum Qt Programming
    Replies: 11
    Last Post: 26th February 2006, 00:32

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.