VGamepad PC
The Windows app for the virtual game controller.
Loading...
Searching...
No Matches
server.cpp File Reference
#include "server.hpp"
#include "executor.hpp"
#include "ui_server.h"
#include "../../third-party-libs/QR-Code-generator/cpp/qrcodegen.hpp"
#include "../settings_key_variables.hpp"
#include <QByteArray>
#include <QDataStream>
#include <QHostAddress>
#include <QList>
#include <QMessageBox>
#include <QNetworkInterface>
#include <QThread>
Include dependency graph for server.cpp:

Functions

QImage createQR (const QString &data, const int border=1, const uint scalingFactor=10)
 Creates a QR code from a string.
 

Function Documentation

◆ createQR()

QImage createQR ( const QString & data,
const int border = 1,
const uint scalingFactor = 10 )

Creates a QR code from a string.

This function uses Nayuki's QR Code Generator library.
Guided by: https://stackoverflow.com/a/39951669/8659747

Parameters
dataThe string to encode
borderThe padding around the QR code (in pixels)
scalingFactorThe scaling factor for the final image
Returns
QImage