Results 1 to 3 of 3

Thread: How to resize QlistWidgetItems??

  1. #1
    Join Date
    Sep 2010
    Posts
    7
    Qt products
    Qt/Embedded
    Platforms
    Symbian S60

    Default How to resize QlistWidgetItems??

    Hello,

    I'm trying to write an application for symbiam with QT Creator.

    I want to fill a Qlistwidget with
    custom frames. I use this code:

    Qt Code:
    1. Frame *frame = new Frame(this);
    2.  
    3.  
    4.  
    5.  
    6. ui->listWidget->addItem(item);
    7. ui->listWidget->setItemWidget(item,frame);
    To copy to clipboard, switch view to plain text mode 


    Frame is a Qframe that I fill with 3 labels.

    The problem is that I don't know how to adjust the size of the QlistWidgetItem and frame to the size of the labels.
    the text it's cut because the frame and listitem don't grow.
    It is the only way that I found to do this.

    And finally another question. How I resize the application to fit the screen?
    ui->layoutWidget->showFullScreen(); ui->layoutWidget->showMaximized(); dosn't run.

    Thank you very much.

  2. #2
    Join Date
    Sep 2010
    Posts
    7
    Qt products
    Qt/Embedded
    Platforms
    Symbian S60

    Default Re: How to resize QlistWidgetItems??

    Sorry, the showFullScreen runs.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to resize QlistWidgetItems??

    Why not use QScrollArea instead of QListWidget?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 1
    Last Post: 2nd May 2010, 00:03
  2. Replies: 2
    Last Post: 23rd February 2010, 08:52
  3. Replies: 2
    Last Post: 22nd January 2008, 17:10
  4. reordering QListWidgetItems of a QListWidget
    By OriginalCopy in forum Qt Programming
    Replies: 14
    Last Post: 4th December 2007, 16:49
  5. Applying fonts to QListWidgetItems
    By L.Marvell in forum Qt Programming
    Replies: 4
    Last Post: 8th May 2006, 11:04

Tags for this Thread

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.