This code works for me quite a while in the 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 he does not find | operator overloading provided by the QFlags class, so the result | returns an int, not a QFlags construct.
I know that I could manually pass the result in (Qt::WindowFlags)and make it work, but QFlags usually make this kind of unnecessary.
Any idea what change could lead to this behavior?
I include <QtGui/QDialog>, which will usually suffice. Inclusion <QtCore/QFlags>does not change behavior.
source
share