[PyQt] split a layout in half to add a widget at runtime.

tabish--> tabish_shaikh555 at yahoo.com
Fri Aug 28 13:42:11 BST 2009


I have implemented the split using your idea of replacing that panel with
another QSplitter, but there is still one problem,
the splitter is not splitting the widget into exact halves, what should i do
about this problem.
i tried to resize the widget but it is not working.


tabish--> wrote:
> 
> Thank you  for replying back,
> but i am still confuse about replacing the panel with a new splitter, i
> will try the idea u bestowed but it will be better if you give me some of
> your code snippet reflecting the splitting behavior.
> 
> Peter Shinners-2 wrote:
>> 
>> I do not have code in an easy to show format. Essentially you have a top
>> level widget that is a QSplitter with two children. When you want to
>> split any of the internal panels, replace that panel with another
>> QSplitter, move the panel into the new child splitter, and add an empty
>> or default panel on the other side of the splitter.
>> 
>> -----Original Message-----
>> From: pyqt-bounces at riverbankcomputing.com
>> [mailto:pyqt-bounces at riverbankcomputing.com] On Behalf Of tabish-->
>> Sent: Thursday, August 27, 2009 1:38 AM
>> To: pyqt at riverbankcomputing.com
>> Subject: RE: [PyQt] split a layout in half to add a widget at runtime.
>> 
>> 
>> Dear Peter Shinners-2
>> 
>> can you please help me with a code of it coz i am unable to go about with
>> the splitters.
>> please help me out.
>> -------------------------------------------------------------
>> 
>> Peter Shinners-2 wrote:
>>> 
>>> These are pictures of Houdini btw, not Maya. I've written this type of
>>> interface a couple times before. My best success was moving away from
>>> "nested splitters" and moving to a "flat" layout of a bunch of panel
>>> widgets.
>>> 
>>> This required me to handle all the dragging myself, but that was a
>>> fairly
>>> easy part to write. Then I could do things like drag at the
>>> intersections
>>> to move in both directions. Best of all it freed my layout from each
>>> panel
>>> having an arbitrary "depth", which will imply small restrictions on the
>>> types of splits you can make.
>>> 
>>> 
>>> -----Original Message-----
>>> From: pyqt-bounces at riverbankcomputing.com
>>> [mailto:pyqt-bounces at riverbankcomputing.com] On Behalf Of tabish-->
>>> Sent: Wednesday, August 26, 2009 12:03 AM
>>> To: pyqt at riverbankcomputing.com
>>> Subject: [PyQt] split a layout in half to add a widget at runtime.
>>> 
>>> 
>>> split a layout in half to add a widget at runtime.
>>> 
>>> it should work similar to split ofr Qdockwiget.
>>> please check the image below to get an idea about it, please help me out
>>> i
>>> am stucked.
>>> this is before the split of the window, and please note that all the
>>> widget
>>> are tabwidget
>>> http://www.nabble.com/file/p25147662/maya_before.png 
>>> 
>>> http://www.nabble.com/file/p25147662/maya_after.png 
>>> this is after the split.
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/split-a-layout-in-half-to-add-a-widget-at-runtime.-tp25147662p25147662.html
>>> Sent from the PyQt mailing list archive at Nabble.com.
>>> 
>>> _______________________________________________
>>> PyQt mailing list    PyQt at riverbankcomputing.com
>>> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>>> 
>>> _______________________________________________
>>> PyQt mailing list    PyQt at riverbankcomputing.com
>>> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>>> 
>>> 
>> 
>> -- 
>> View this message in context:
>> http://www.nabble.com/split-a-layout-in-half-to-add-a-widget-at-runtime.-tp25147662p25167264.html
>> Sent from the PyQt mailing list archive at Nabble.com.
>> 
>> _______________________________________________
>> PyQt mailing list    PyQt at riverbankcomputing.com
>> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>> 
>> _______________________________________________
>> PyQt mailing list    PyQt at riverbankcomputing.com
>> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/split-a-layout-in-half-to-add-a-widget-at-runtime.-tp25147662p25189226.html
Sent from the PyQt mailing list archive at Nabble.com.



More information about the PyQt mailing list