Hi. I’ve looked at QLabel code and concluded that QLabel doesn’t support shrinking less than 80 characters long.
Fix me if I’m wrong. If I’m right then even QLabel not suitable for mobile development, and I have to write something simple, that will for example use QStaticText, to draw text labels and will automatically shrink for the mobile screen width. Am I right? Thnaks. From: igor.mironc...@gmail.com Sent: Tuesday, February 18, 2014 12:46 PM To: interest@qt-project.org Subject: QLabel and QScrollArea Hi. Is it possible to make the QLabel shrinkable with QScrollArea. I.e. when QScrollArea reduces its width, QLabel should shring its width to the QScrollArea::viewport().width() but grows in height... I tell about QLabel with text, not with pixmap... class Widget : public QWidget{public: Widget() { QVBoxLayout * l = new QVBoxLayout( this ); QScrollArea * scrollArea = new QScrollArea( this ); QLabel * label = new QLabel; label->setWordWrap( true ); label->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Expanding ); label->setText( QLatin1String( "The volume of the ringer and alerts " "can be adjusted using the volume buttons. " "The volume of the ringer and alerts " "can be adjusted using the volume buttons. " "The volume of the ringer and alerts " "can be adjusted using the volume buttons. " "The volume of the ringer and alerts " "can be adjusted using the volume buttons. " ) ); scrollArea->setWidget( label ); scrollArea->setWidgetResizable( true ); l->addWidget( scrollArea ); }}; The code above doesn’t work as I expected... Any ideas? Thanks.
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest