[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lyx-devel
Subject:    Qt3/Win Free: qtoolbar problem?
From:       Angus Leeming <leeming () lyx ! org>
Date:       2005-01-18 12:44:43
Message-ID: csj072$81v$2 () sea ! gmane ! org
[Download RAW message or body]

Dear all,

here's my second little bug report. Actually, I'm not sure that this is a
bug report at all. Perhaps what I'm going to describe is actually an
example of the difference between native looks on Windows and linux?

Anyway, the report. This demo program

int main(int argc, char * argv[])
{
    QApplication a( argc, argv );

    QPixmap image( (const char **) image_data );

    QToolBar toolbar;
    toolbar.resize( 100, 30 );

    QToolButton button(image, "Stop!", "",  0, 0, &toolbar, "");
    button.setEnabled(false);

    a.setMainWidget( &toolbar );
    toolbar.show();
    return a.exec();
}

Does not display the icon of the disabled button at all on Windows. On
linux, the pixmap is greyed out so that its outline is still visible.
Attached are (small) screenshots showing the behaviour on Windows and on
linux Also attached is the demo program which I compiled with

$ g++ -Iqt3/include -o trial2 trial2.C Lqt3/lib -lqt-mt

I hope that's enough to get to the bottom of this problem too.

Kind regards,
Angus

["toolbar_disabled_linux.png" (image/png)]
["toolbar_disabled_win32.png" (image/png)]
["toolbar_enabled_linux.png" (image/png)]
["toolbar_enabled_win32.png" (image/png)]
["trial2.C" (text/x-csrc)]

#include <qapplication.h>
#include <qpixmap.h>
#include <qpushbutton.h>
#include <qtoolbar.h>
#include <qtoolbutton.h>

static const char* const image_data[] = {
"22 22 50 1",
". c None",
"g c #000000",
"# c #180808",
"a c #200808",
"h c #290c08",
"b c #311010",
"p c #5a2820",
"x c #8b0c08",
"f c #8b615a",
"N c #9c0400",
"w c #ac0000",
"o c #b44c41",
"M c #bd0400",
"T c #bd1410",
"J c #bd2410",
"v c #bd615a",
"E c #c53c31",
"R c #c54c41",
"I c #c55041",
"u c #c5695a",
"t c #c56962",
"s c #c56d62",
"V c #c57d7b",
"D c #cd5552",
"C c #cd5d52",
"H c #cd615a",
"r c #cd716a",
"e c #cdbebd",
"B c #d5655a",
"A c #d56962",
"z c #d56d62",
"L c #d5716a",
"S c #d57573",
"O c #d57973",
"n c #d57d7b",
"y c #de716a",
"G c #de7573",
"P c #de7d73",
"m c #de8583",
"c c #de898b",
"l c #de918b",
"K c #e67d73",
"F c #e67d7b",
"k c #e6958b",
"j c #e69d94",
"U c #e6d2d5",
"q c #ee9d94",
"d c #ffeaee",
"Q c #fffaff",
"i c #ffffff",
"......................",
"......#aaaaaaaa.......",
".....bcddddddefg......",
"....hcijjkllmnopg.....",
"...hciqrrstuuvwxpg....",
"..bcilyyyzABCDEwxpg...",
".#ciqyyiFGyzHiIJwxpg..",
".adjKyiiiFGLiiiIMNpg..",
".adjOyFiiiPiQiCEMNpg..",
".adkOzGFiiiiiCREMNpg..",
".adlOAyGPiiiHIIEMNpg..",
".adlSBzLiiiiiRETMNpg..",
".#dnrCHiQiHiiiJMMNpg..",
".aUnvEiiiCIRiiiJMNpg..",
".aVowJEiRREJJiMMNxpg..",
"..gpxwJJJJTJMJMNxpg...",
"...gpxwMMMMMMMNxpg....",
"....gpxNNNNNNNxpg.....",
".....gpppppppppg......",
"......ggggggggg.......",
"......................",
"......................"};


int main(int argc, char * argv[])
{
    QApplication a( argc, argv );

    QPixmap image( (const char **) image_data );

    QToolBar toolbar;
    toolbar.resize( 100, 30 );

    QToolButton button(image, "Stop!", "",  0, 0, &toolbar, "");
    button.setEnabled(false);

    a.setMainWidget( &toolbar );
    toolbar.show();
    return a.exec();
}


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic