PDA

View Full Version : How to resize QlistWidgetItems??



druidamix
19th September 2010, 16:06
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:


Frame *frame = new Frame(this);

QListWidgetItem *item = new QListWidgetItem();



ui->listWidget->addItem(item);
ui->listWidget->setItemWidget(item,frame);


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.

druidamix
19th September 2010, 16:09
Sorry, the showFullScreen runs. :p

wysota
20th September 2010, 01:39
Why not use QScrollArea instead of QListWidget?