CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2013
    Posts
    44

    About Qt window background color

    Hi there !

    I have the following very short code :

    int main(int argc, char *argv[])
    {
    QApplication app(argc, argv);
    QDir::setCurrent(QCoreApplication::applicationDirPath());
    QPalette p;
    p.setColor(QPalette::Window, QColor(0xff, 0x00, 0x00));
    app.setPalette(p);
    MainWindow w;
    w->show();
    return app.exec();
    }

    The displayed window is white, not red ... Why ?

    Thank you for your help

  2. #2
    Join Date
    Jan 2013
    Posts
    44

    Re: About Qt window background color

    Sorry I forgot to put the code in gray color !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured