Extract tags from the model using TagRole
This commit is contained in:
		
					parent
					
						
							
								186b0fa0ff
							
						
					
				
			
			
				commit
				
					
						d914dd9744
					
				
			
		
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -107,6 +107,12 @@ QVariant DanbooruPostModel::data(const QModelIndex &index, int role) const
 | 
			
		|||
            return QSize(post->width(), post->height());
 | 
			
		||||
        case RatingRole:
 | 
			
		||||
            return post->rating();
 | 
			
		||||
        case TagRole:
 | 
			
		||||
        {
 | 
			
		||||
            QVariant variant;
 | 
			
		||||
            variant.setValue(post->tags());
 | 
			
		||||
            return variant;
 | 
			
		||||
        }
 | 
			
		||||
        default:
 | 
			
		||||
            return QVariant();
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue