[Qt-interest] How to design one new browser(not for HTML) with PyQt

Tony Rietwyk tony.rietwyk at rightsoft.com.au
Mon Jul 26 04:58:46 CEST 2010


You can only set one widget via QScrollArea.setWidget, so assuming you have
scrollArea variable: 
 
   QWidget *browserContents = new QWidget( scrollArea );
   // Add widgets to browserContents
   // Add layout to browserContents
   scrollArea->setWidget( browserContents )
 
Hope that helps, 
 
Tony
 

-----Original Message-----
From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of ocean
Sent: Monday, 26 July 2010 12:33
To: qt-interest at trolltech.com
Subject: [Qt-interest] How to design one new browser(not for HTML) with PyQt


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 

No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.851 / Virus Database: 271.1.1/3024 - Release Date: 07/26/10
04:36:00




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100726/ef71e696/attachment.html 


More information about the Qt-interest-old mailing list