PDA

View Full Version : How to design one new browser(not for HTML) with PyQt



ubuntu
26th July 2010, 03:09
Hi,my friends and i plan to develop one new web designing language(just for practice,have no plan to popularize it yet now) and we also need to design one small new browser for our new language(using PyQt under linux).we plan to do like this:
1.divide contents of the web page into several parts and each part is put into one widget(Text Edit for text and Label for picture)
2.using the layout of QT to layout the contents of the web page(widgets)
Our problem is that when the widgets is out of the range of the mainwindow,the mainwindow doesn't has scroll bar.
we try to use the ScrollArea and put the widgets in it but we find that its the widgets that get the scroll bar not the mainwindow(just as the picture in attachments shows)
then what should we do to make the mainwindow has one scroll bar when theres too many widgets on it?just like the common browser does.
thanks

wysota
26th July 2010, 03:24
Place a QScrollArea as the central widget of the main window (or inside the central widget in case you are using Designer - and don't forget about layouts) and place all your widgets inside this scroll area (again remember about layouts).

ubuntu
26th July 2010, 03:49
Place a QScrollArea as the central widget of the main window (or inside the central widget in case you are using Designer - and don't forget about layouts) and place all your widgets inside this scroll area (again remember about layouts).
Thanks,ill try:)