Results 1 to 3 of 3

Thread: Qt 4.2: QListWidget changes size of its items

  1. #1
    Join Date
    Oct 2006
    Posts
    3
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Qt 4.2: QListWidget changes size of its items

    Hi,
    with the migration from Qt 4.1.4 to Qt 4.2 my QListWidget changes the size of its items. I attached a sample screenshot from the dialog in which that happens. It’s the initial filling of the QListWidget. When items get updated with new data it sometimes happens that they resize from the original (small) size to the bigger one. I checked that no “\n” gets attached to the text()-QString. Any ideas?
    Btw, using VC++ 2005 with stock 4.2.0 Desktop here.
    Best regards.
    Attached Images Attached Images

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Qt 4.2: QListWidget changes size of its items

    Isn't that a QTreeWidget? Are you setting any size hints for the items? This is just an idea, but try setting QTreeView's uniform row heights property to true.
    J-P Nurmi

  3. #3
    Join Date
    Oct 2006
    Posts
    3
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt 4.2: QListWidget changes size of its items

    Yea, setting setUniformRowHeights(true) fixed the display in Qt 4.2.0.
    And of course you're right, it's a QTreeWidget.

Similar Threads

  1. Replies: 11
    Last Post: 21st February 2007, 11:26
  2. Replies: 1
    Last Post: 24th August 2006, 11:44
  3. [Qt4]: Adding centered items in QListWidget
    By Jojo in forum Qt Programming
    Replies: 4
    Last Post: 16th March 2006, 20:04
  4. Qt 4.1.1 linker warnings
    By Matt Smith in forum Installation and Deployment
    Replies: 0
    Last Post: 26th February 2006, 22:14
  5. Getting all items of a QListWidget
    By Codepoet in forum Qt Programming
    Replies: 3
    Last Post: 17th January 2006, 22:52

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.