Weird error: "2 overloads have no legal conversion"
-
I have some code that is setting a color in a QMainWindows palette. It works fine if I have:
@
QPalette p = win->palette();
p.setColor(QPalette::Window, Qt::white);
@But it throws the error "QPalette::setColor 2 overloads have no legal conversion for 'this' pointer" if I have this:
@
(win->palette()).setColor(QPalette::Window, Qt::white);
@Can anyone explain this error to me?