I've had this code running for quite a while in a library:
MyClass::MyClass()
: QDialog()
{
// (...)
setWindowFlags( Qt::CustomizeWindowHint | Qt::WindowTitleHint );
// (...)
}
Then, after changing various parts of the library, I get this message all of a sudden:
error C2664: 'QWidget::setWindowFlags': cannot convert parameter 1 from 'int' to 'Qt::WindowFlags'
Apparently it doesn't find the | operator overload provided by the QFlags class so that the result of | returns an int rather than a QFlags construct.
I know I could manually cast the result to (Qt::WindowFlags)
and make it work, but QFlags would usually make this kind of cast unnecessary.
Any idea what kind of change could lead to this behaviour?
I am including <QtGui/QDialog>
which would usually be sufficient. Including <QtCore/QFlags>
doesn't change the behaviour.