質問

Well i have a QIODevice where i want to store data. But have issues with it. Everytime i try to create one i get errors.

QIODevice dev;
dev.open(QIODevice::ReadWrite);
dev.write(md);
dev.close();

What i just want to store is a QByteArray (where you can use it with write(QByteArray) and then use it later.

Any idea?

The error is "cannot declare variable dev of abstract type 'QIODevice'".

役に立ちましたか?

解決

You cannot declare variable of abstract type)). QIODevice is abstract. If you wanna use it you have to look at one of Q3Socket, Q3SocketDevice, QAbstractSocket, QBuffer, QFile, QLocalSocket, QNetworkReply, and QProcess.

I think best way for use is using QByteArray only.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top