New kdelibs snapshot
Thiago Macieira
thiago at kde.org
Wed Mar 22 14:11:23 GMT 2006
Hamish Rodda wrote:
>[Issue N107793] Adding actions with icons to QMenuBar shows only an icon
> where it should show only text (note: not yet accepted, only just
> emailed to tt)
You're adding the icon to the menu bar itself? I've never seen that.
It works in the menus themselves.
>
>Testcases are attached for anyone particularly eager to help tt :)
>
>Cheers,
>Hamish.
>issue107793.cpp
> #include <QtGui>
>
>int main(int argc, char **argv)
>{
> QApplication app(argc, argv);
>
> QMainWindow* mw = new QMainWindow();
>
> QAction* a = new QAction(&app);
>
> QPixmap pm(64, 64);
> {
> QPainter p(&pm);
> p.fillRect(0,0,64,64,Qt::green);
> }
>
> a->setIcon(QIcon(pm));
> a->setText("A Menu");
>
> mw->menuBar()->addAction(a);
>
> mw->show();
>
> return app.exec();
>}
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
thiago.macieira (AT) trolltech.com Trolltech AS
GPG: 0x6EF45358 | Sandakerveien 116,
E067 918B B660 DBD1 105C | NO-0402
966C 33F5 F005 6EF4 5358 | Oslo, Norway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060322/16ecbff3/attachment.sig>
More information about the kde-core-devel
mailing list