@@ -50,7 +50,6 @@ QgsStyleExportImportDialog::QgsStyleExportImportDialog( QgsStyle* style, QWidget
5050 connect ( pb, SIGNAL ( clicked () ), this , SLOT ( clearSelection () ) );
5151
5252 QStandardItemModel* model = new QStandardItemModel ( listItems );
53-
5453 listItems->setModel ( model );
5554 connect ( listItems->selectionModel (), SIGNAL ( selectionChanged ( const QItemSelection&, const QItemSelection& ) ),
5655 this , SLOT ( selectionChanged ( const QItemSelection&, const QItemSelection& ) ) );
@@ -196,10 +195,16 @@ bool QgsStyleExportImportDialog::populateStyles( QgsStyle* style )
196195 for ( int i = 0 ; i < styleNames.count (); ++i )
197196 {
198197 name = styleNames[i];
198+ QStringList tags = style->tagsOfSymbol ( QgsStyle::SymbolEntity, name );
199199 QgsSymbol* symbol = style->symbol ( name );
200200 QStandardItem* item = new QStandardItem ( name );
201201 QIcon icon = QgsSymbolLayerUtils::symbolPreviewIcon ( symbol, listItems->iconSize (), 15 );
202202 item->setIcon ( icon );
203+ item->setToolTip ( QString ( " <b>%1</b><br><i>%2</i>" ).arg ( name ).arg ( tags.count () > 0 ? tags.join ( " , " ) : tr ( " Not tagged" ) ) );
204+ // Set font to 10points to show reasonable text
205+ QFont itemFont = item->font ();
206+ itemFont.setPointSize ( 10 );
207+ item->setFont ( itemFont );
203208 model->appendRow ( item );
204209 delete symbol;
205210 }
0 commit comments