def insert_qimage_format(cursor, format):
    """
    Insert a QImage given by a format at a cursor.
    :param cursor: QTextCursor where to insert.
    :param format: QImageFormat of the image.
    :return:
    """
    cursor.insertBlock()
    cursor.insertImage(format)
    cursor.insertBlock()
