If have a specific widget at the position on the mainwindow, then it will quick and simple to set a tool tip on that widget. Add img html tags in the tool tip string.
Here is an example, assuming you have images in resource files.
QWidget * widget;
//widget in mainwindow
QString html
= "<p><img src=\":images/image-1.ico\" height=\"50\" width=\"50\"></p>" "<p><img src=\":images/image-2.ico\" height=\"50\" width=\"50\"></p>"
"<p><img src=\":images/image-3.ico\" height=\"50\" width=\"50\"></p>"
"<p><img src=\":images/image-4.ico\" height=\"50\" width=\"50\"></p>";
widget.setToolTip(html);
QWidget * widget;//widget in mainwindow
QString html = "<p><img src=\":images/image-1.ico\" height=\"50\" width=\"50\"></p>"
"<p><img src=\":images/image-2.ico\" height=\"50\" width=\"50\"></p>"
"<p><img src=\":images/image-3.ico\" height=\"50\" width=\"50\"></p>"
"<p><img src=\":images/image-4.ico\" height=\"50\" width=\"50\"></p>";
widget.setToolTip(html);
To copy to clipboard, switch view to plain text mode
Note this approach will not be of much use if you plan to select the images in the popoup. If you need to select the images in the popup then QMenu or QListView approach is better
Bookmarks