hi
i want to change color of push button .
the does this in linux but in windows it does not work .
#include <QtGui>
int main(int argc, char *argv[])
{
b.show();
b.setPalette(palette);
return a.exec();
}
#include <QtGui>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QPushButton b;
b.show();
QPalette palette;
QBrush brushg(QColor(0, 255, 0, 255));//green
palette.setBrush(QPalette::Active, QPalette::Button, brushg);
b.setPalette(palette);
return a.exec();
}
To copy to clipboard, switch view to plain text mode
the above program displays a pushbutton in green color in linux, but the same program after compiling in windows and running the color of pushbutton is not green in color.
the same is with the designer. i can change the color of pushbutton using designer in linux but in windows it does not work.
Bookmarks