Hi all,

I've been testing my codebase under OS/X Leopard (10.5.5, Intel) and  
Qt4.5.0-tp1 to see if I can find any fresh bugs... my code works fine  
when built against Qt4.4.2, FWIW.

One thing I've found is that if I use QWindowsStyle and set up a  
custom palette, my window's colors don't show up correctly until I  
resize the window.  I haven't been able to reproduce this problem  
exactly outside of my program, but here is something I think is related:

1) Edit the file $QTDIR/examples/script/calculator/main.cpp, inserting  
the following lines directly after the declaration of the QApplication  
object on line 57:

{
    app.setStyle(new QWindowsStyle);
    QPalette p = QPlastiqueStyle().standardPalette();
    p.setColor(QPalette::Active, QPalette::Window, Qt::blue);
    app.setPalette(p);
}

2) Compile and run the program (you'll need to add the necessary  
#include lines too, of course)

3) At this point, I would expect to see a Calculator GUI, with widgets  
shown in the WindowsXP style, with a blue background.

However, if I run the program like this:

    open calculator.app

then I only see the window flash blue for a second, and then it  
reverts to the default WindowsXP colors.  That is wrong, I think.

On the other hand, if I run the program like this:

    ./calculator.app/Contents/MacOS/calculator

then the window opens with the correct colors (blue background), but  
reverts to the default WindowsXP colors as soon as it is clicked on.   
This is also wrong.

It should start up blue, and stay blue.

Thanks,
Jeremy

_______________________________________________
Qt4-preview-feedback mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback

Reply via email to