Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt - Problems while serializing "double"

I serialize "double" data type and get an error though

 QDataStream & operator<< ( double f )

operator is defined. Here is the error message:

 error: conversion from 'double' to 'const QChar' is ambiguous

Did you meat this situation or understand why it can be like this?

like image 425
Narek Avatar asked Jul 23 '10 19:07

Narek


1 Answers

It sounds like it can't see the operator for double, so it's trying to implicitly create a QChar from the double to send to the stream, but QChar has multiple constructors that could possibly match.

Make sure that your header includes are all correct.

Can you show us the code where you're trying to serialize the double?

like image 189
Mark B Avatar answered Oct 23 '22 06:10

Mark B