PDA

View Full Version : scrollbar in a qframe



davea402
19th February 2008, 21:10
hi guyz,

don't know if this has been answered...i checked the forum but couldn't find anything...

i have a widgetstack with 10 different qframes...i also have a qlistview...when i click on different lists then different qframes are showen from the widgetstack.

the question is regarding a qframe...the frame has more information than the height of the frame. the height of the frame is regulated to a fixed size. since the qframe has more information than the height i want to put a scrollbar so that users can view the information by clicking on the scrollbar and going down on the qframe.

i can not use qscrollarea...and when i try to use qscrollview then that creates another window which i do not want...also it does not put a scroll bar on my qframe.

jpn
20th February 2008, 15:18
i can not use qscrollarea...
QScrollArea is a Qt 4 class. Presumably you're using Qt 3, aren't you? Could you mark Qt 3 as your used products in User CP, please. Also, marking new threads related to either Qt 3 or Qt 4 is recommended. You know, Qt 3 and Qt 4 are pretty much different.


and when i try to use qscrollview then that creates another window which i do not want...also it does not put a scroll bar on my qframe.
You must pass the frame as parent to QScrollView constructor.

davea402
21st February 2008, 18:26
hi thanks,

I got the scrollview working...

now i can scroll up and down the frame...however I have one more question..

since there are more frames in the widgetstack when i am in one frame and i scroll down and go to another frame. the other frame is displayed a bit down. shown in the example:

the first screenshot is just the mux frame, then the others frame, then the other's frame scrolled down, and then back to the mux frame....

however if i click on any other frames...everything is proper...its only after i click on the others frame and scroll down then clicking on any other frames ...the frame is displayed not properly.

dave