Thread: MLabel wordwrap
View Single Post
Posts: 1 | Thanked: 0 times | Joined on Aug 2012
#1
Hello,

I'm developing my first application using the MeegoTouch API.
I have an MLabel with a big text and I have set the WordWrap-mode.
The problem is that the text is still displayed on 1 line (although it is too big for the screen.)

This is my code:
Code:
void ErrorPage::createContent()
{	
	 MLayout *layout = new MLayout;

    	MFlowLayoutPolicy *policy = new MFlowLayoutPolicy(layout);
    	
	centralWidget()->setLayout(layout);
	
	MLabel *warningLabel = new MLabel("An error occured while fetching video information. Please check your internet connection.");
	warningLabel->setWordWrap(true);
	warningLabel->setWrapMode(QTextOption::WordWrap);
	policy->addItem(warningLabel);
}
It will be something small I guess, but I really don't find it, and I have spent quite some time searching for it on Google or on the API documentation without a solution, so I really hope someone can help me...