+ // Get the MIME type.
+ QMimeType mimeType = mimeDatabase.mimeTypeForName(mimeTypeString);
+
+ // Get the MIME type icon.
+ QIcon mimeTypeIcon = QIcon::fromTheme(mimeType.iconName());
+
+ // Create a graphics scene.
+ QGraphicsScene *mimeGraphicsScenePointer = new QGraphicsScene(this);
+
+ // Set the graphics scene.
+ mimeGraphicsViewPointer->setScene(mimeGraphicsScenePointer);
+
+ // Set the background of the graphics view to be the same as the window
+ mimeGraphicsViewPointer->setBackgroundRole(QPalette::Window);
+
+ // Add the MIME type icon to the scene.
+ mimeGraphicsScenePointer->addPixmap(mimeTypeIcon.pixmap(64, 64));
+