qtsmartgraphics  2.1.1
A simple library that improves the user experience when displaying images by Qt's QLabel and QGraphicsView.
Installation Guide

The tutorial shows how to use the library by Qt Creator

  1. Put qsmartgraphicsview.h, qsmartgraphicsview.cpp, qsmartlabel.h, qsmartlabel.cpp into your Qt project.
  2. Go to mainwindow.ui
  3. Add a new QGraphicsView or QLabel in Creator.
  4. Right click the widget and choose “promote to…”
  5. Add the promote widget by entering the name of the class in the line edit at the button.

    PromoteTo
  6. Click “Add”
  7. Click the added class then press promote.
  8. Open main.cpp
  9. Add #include <QReadWriteLock> and QReadWriteLock lock;

    It should look like this:

    #include "mainwindow.h"
    
    #include <QApplication>
    
    #include <QReadWriteLock>
    
    QReadWriteLock lock;
    
  10. Functions below can be turned on or off individually.

    OpenCV

    If you wish to use OpenCV, add DEFINE += HAVE_OPENCV in your *.pro file.

    OpenGL

    If you wish to use OpenGL, you'll have to use OpenGL version (< QT 5.5) or add opengl module in the *.pro file (>= QT5.5). (QT += opengl)

    QSideButtonBar

    If you wish to turn off the SideButtonBar, add DEFINES += NO_SIDEMENU in your *.pro file.

    QtSVG

    If you wish to use icon for your QtSmartGraphicsView, add svg module in the *.pro file. (QT += svg)

  11. Done.