I do not understand what you try to do with your code as it seems to be out of order, but the following code works for me:
main.cpp
#include <QString>
#include <QByteArray>
#include <QDebug>
int main()
{
QByteArray buffer = "0A010A3C";
QString nburn_data;
bool ok;
for (int i = 0; i < 8; i+=2) {
if (i)
nburn_data.append('.');
nburn_data.append(QByteArray::number(buffer.mid(i, 2).toInt(&ok, 16)));
// when using int buffer, then replace the above line with this:
// nburn_data.append(buffer.mid(i, 2));
}
qDebug() << nburn_data;
return 0;
}
main.pro
TEMPLATE = app
TARGET = main
QT = core
SOURCES += main.cpp
Build and Run
qmake && make && ./main
Output
"10.1.10.60"
Edit: since you seem to have changed your input when updating the question, you will need to this update to my previous code answering your original question:
tempbuffer = tempbuffer.toHex(); // before the loop in your code
or you could just remove the needless number conversion in my loop, so replacing the inner line with this:
nburn_data.append(buffer.mid(i, 2));