def syncView(self, recursive=False):
        """
        Syncs the information from this item to the view.
        """
        # update the view widget
        gantt = self.ganttWidget()
        tree = self.treeWidget()
        
        if not gantt:
            return
        
        vwidget = gantt.viewWidget()
        scene = vwidget.scene()
        cell_w = gantt.cellWidth()
        
        tree_offset_y  = tree.header().height() + 1
        tree_offset_y += tree.verticalScrollBar().value()
        
        # collect the items to work on
        items = [self]
        if recursive:
            items += list(self.children(recursive=True))
        
        for item in items:
            # grab the view item from the gantt item
            vitem = item.viewItem()
            if not vitem.scene():
                scene.addItem(vitem)
            
            # make sure the item should be visible
            if item.isHidden() or not tree:
                vitem.hide()
                continue
            
            vitem.show()
            tree_rect = tree.visualItemRect(item)
            
            tree_y  = tree_rect.y() + tree_offset_y
            tree_h  = tree_rect.height()
            
            # check to see if this item is hidden
            if tree_rect.height() == 0:
                vitem.hide()
                continue
            
            if gantt.timescale() in (gantt.Timescale.Minute,
                                     gantt.Timescale.Hour, 
                                     gantt.Timescale.Day):
                dstart = item.dateTimeStart()
                dend   = item.dateTimeEnd()
                view_x = scene.datetimeXPos(dstart)
                view_r = scene.datetimeXPos(dend)
                view_w = view_r - view_x
            else:
                view_x = scene.dateXPos(item.dateStart())
                view_w = item.duration() * cell_w
            
                # determine the % off from the length based on this items time
                if not item.isAllDay():
                    full_day = 24 * 60 * 60 # full days worth of seconds
                    
                    # determine the start offset
                    start      = item.timeStart()
                    start_day  = (start.hour() * 60 * 60) 
                    start_day += (start.minute() * 60) 
                    start_day += (start.second())
                    
                    offset_start = (start_day / float(full_day)) * cell_w
                    
                    # determine the end offset
                    end         = item.timeEnd()
                    end_day     = (end.hour() * 60 * 60)
                    end_day    += (start.minute() * 60)
                    end_day    += (start.second() + 1) # forces at least 1 sec
                    
                    offset_end  = ((full_day - end_day) / float(full_day))
                    offset_end *= cell_w
                    
                    # update the xpos and widths
                    view_x += offset_start
                    view_w -= (offset_start + offset_end)
            
            view_w = max(view_w, 5)
            
            vitem.setSyncing(True)
            vitem.setPos(view_x, tree_y)
            vitem.setRect(0, 0, view_w, tree_h)
            vitem.setSyncing(False)
            
            # setup standard properties
            flags  = vitem.ItemIsSelectable 
            flags |= vitem.ItemIsFocusable
            
            if item.flags() & Qt.ItemIsEditable:
                flags |= vitem.ItemIsMovable
            
            vitem.setFlags(flags)
            item.syncDependencies()