I was making a program which will conver text to pixel image and I occured some problems while trying to compile the code.
First problem is with QMessangeLogger:
C:QtQt5.7.05.7mingw53_32includeQtCoreqlogging.h:158: błąd: expected ',' or ';' before 'QMessageLogger'
#define qDebug QMessageLogger(QT_MESSAGELOG_FILE, QT_MESSAGELOG_LINE, QT_MESSAGELOG_FUNC).debug
When I'm double clicking on it, it takes me back to one of Qt's main files.
Second problem is with Qt list:
F:GraphicalCrypterGraphicalCrypterencryptmy.cpp:46: błąd: cannot convert 'QList<int>' to 'int' for argument '1' to 'constexpr QRgb qRgba(int, int, int, int)'
value = qRgba(intArray[index-3], intArray[index-2], intArray[index-1],intArray[index]);
Here is my code :
//encryptmy.cpp http://pastebin.com/mnLqNHAy
//encryptmy.hpp http://pastebin.com/qyhYE9v7
//main.cpp
#include <QApplication>
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include "encryptmy.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QQmlApplicationEngine engine;
enCryptMy enryptmy;
engine.rootContext()->setContextProperty("enCryptMy", &enryptmy);
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
return app.exec();
}
The QList error is appearing in line 46 in my file (link to pastebin). And the first one appears in qlogging.hpp in line 158. Just for sure, I have not changed anything in this file.
What is wrong with this code? I've tried several methods to fix those error but none helped.
Thanks in advance!
Aucun commentaire:
Enregistrer un commentaire