msalman
7th July 2011, 07:32
Hi,
I have to display a scrollable label, it contains some help text so it is bigger than the height of the screen, so i use scroll area to display that label. I have been able to scroll the label in C7 device but when i run it on E72 then the scroll bar doesn't scroll.
Following is my code
QWidget* window = new QWidget;
QVBoxLayout* layout = new QVBoxLayout(window);
QPushButton* optsButton = new QPushButton("Options");
QPushButton* exitButton = new QPushButton("Exit");
QLabel *name = new QLabel("some text which makes the vertical scroll enble");
name->setWordWrap(true);
name->setMaximumWidth(320-35);
layout->addWidget(name);
layout->addWidget(optsButton);
layout->addWidget(name);
layout->addWidget(exitButton);
layout->addWidget(name);
QScrollArea* scr = new QScrollArea;
scr->setWidget(window);
scr->setWidgetResizable(false);
scr->setBackgroundRole(QPalette::Dark);
scr->show();
I will be really thankful if some one give me even any hint regarding that. I am facing this problem in E72, this piece of code works fine on C7 device and show all labels with complete text.
I have to display a scrollable label, it contains some help text so it is bigger than the height of the screen, so i use scroll area to display that label. I have been able to scroll the label in C7 device but when i run it on E72 then the scroll bar doesn't scroll.
Following is my code
QWidget* window = new QWidget;
QVBoxLayout* layout = new QVBoxLayout(window);
QPushButton* optsButton = new QPushButton("Options");
QPushButton* exitButton = new QPushButton("Exit");
QLabel *name = new QLabel("some text which makes the vertical scroll enble");
name->setWordWrap(true);
name->setMaximumWidth(320-35);
layout->addWidget(name);
layout->addWidget(optsButton);
layout->addWidget(name);
layout->addWidget(exitButton);
layout->addWidget(name);
QScrollArea* scr = new QScrollArea;
scr->setWidget(window);
scr->setWidgetResizable(false);
scr->setBackgroundRole(QPalette::Dark);
scr->show();
I will be really thankful if some one give me even any hint regarding that. I am facing this problem in E72, this piece of code works fine on C7 device and show all labels with complete text.