Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.11.3
-
None
-
windows/linux
Description
// label2, label3 will not wrap correctly
#include <QApplication>
#include <QWidget>
#include <QLabel>
#include <QVBoxLayout>
int main(int argc, char** argv)
{ QApplication app(argc, argv); QWidget w; w.setFixedSize(300, 300); QVBoxLayout hlay(&w); QLabel label1("hello world hello world hello world hello world hello world hello world hello world"); label1.setWordWrap(true); QLabel label2("http://www.helloworld1helloworld2helloworld3helloworld4helloworld5helloworld6helloworld7.com/helloworld/test"); label2.setWordWrap(true); QLabel label3("1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz"); label3.setWordWrap(true); hlay.addWidget(&label1); hlay.addWidget(&label2); hlay.addWidget(&label3); w.show(); return app.exec(); }