#NEWLINE# def _tabs_add_frame( area , tabs , frame ) : #NEWLINE# #INDENT# ' Add a frame to a dock tab widget.\n\n    ' #NEWLINE# containers = [ ] #NEWLINE# if isinstance ( frame , QDockWindow ) : #NEWLINE# #INDENT# temp_area = frame . dockArea ( ) #NEWLINE# frame . setDockArea ( None ) #NEWLINE# _merge_dock_bars ( area , temp_area ) #NEWLINE# containers . extend ( iter_containers ( temp_area ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# containers . append ( frame ) #NEWLINE# #UNINDENT# for container in containers : #NEWLINE# #INDENT# if container . isWindow ( ) : #NEWLINE# #INDENT# container . unfloat ( ) #NEWLINE# #UNINDENT# container . hideTitleBar ( ) #NEWLINE# tabs . addTab ( containers , container . icon ( ) , container . title ( ) ) #NEWLINE# container . show ( ) #NEWLINE# #UNINDENT# tabs . setCurrentIndex ( ( tabs . count ( ) - 1 ) )