I am using Qt4.4.3. Following is my issue;
1. I have a QWidget which I use to create a tag cloud view (a weighted list placed in a rectangle area where the words (text) are of varying size). See attachment.
2. The QWidget which has the tag cloud is created at runtime
3. The problem is when the amount of text is large, and its area exceeds that of the container QWidget, a ScrollBar DOESN't appear. You can see this in the attachment
4. I tried enclosing the the QWidget into a QScrollArea as follows, but it doesn't work, the scrollbar doesn't appear.
5. Is it possible to havea ScrollArea for a QWidget, or should I be using a different type of widget instead of QWidget Eg a QTextEdit to create the tag cloud?Qt Code:
tagCloudScrollArea->setGeometry(tagCloudDisplay->geometry()); tagCloudScrollArea->setWidget(mainWidget->tagCloudDisplay); // MainWidget is the container widget i.e. the window itself tagCloudScrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); tagCloudScrollArea->setWidgetResizable(true);To copy to clipboard, switch view to plain text mode
Any advise or suggestions will really be appreciated.
Thanks.
Bookmarks