Hi
All last week I was struggling to learn the Model-View framework and find a way to solve my problem with it's help. Basically I need to layout some editable graphical UI elements (arrows, circles, text blocks, etc) on a grid. The layout is supposed to be nested - i.e. some grid cell may contain another grid of UI elements. The M/V framework seems to be exactly what I need - QAbstractiItemModel allows to define nested or recursive layout. I also created several item delegates which draw my geometric primitives and allow me to edit text blocks. Now I'm stuck with the front-end side of things. It looks like any of the existing implementations of QAbstractItemView does not support displaying nested models, so I looked for implementing QAbstractItemView.
There is no QAbstractItemView subclassing reference. Right now I'm trying to subclass it and display my nested model using the delegate classes I created, but it seems to be a complicated task.
What is necessary to implement such a view?
Thanks
Anton
P.S.
I searched the forums. This question seems to be pretty common, but I have not found an explanation or an example.


 
					
					 
							
						 
    
    
    
    
    
    
   
    
    
    
    
    
    
   Subclassing QAbstractItemView
 Subclassing QAbstractItemView
		 
				
				
				
					 Reply With Quote
  Reply With Quote 
							
								
 
    
    
       
    
    
    
    
   
    
    
       
    
    
    
       
    
    
       
    
   Originally Posted by wysota
 Originally Posted by wysota
					


Bookmarks