gamecreature / QtAwesome

QtAwesome - Font Awesome for Qt Applications
Other
787 stars 149 forks source link

not rendering properly #19

Closed stefanchiriac closed 8 years ago

stefanchiriac commented 8 years ago

Hello,

I'm using qt 4.8.6 with ubuntu 16.04 and I'm trying to insert an icon inside a button, but the result is not rendering properly.

            QPushButton *deleteButton = new QPushButton();
            deleteButton->setFlat(true);
            deleteButton->setFixedWidth(32);
            deleteButton->setFixedHeight(32);
            deleteButton->setIcon(awesome->icon(fa::remove));
            deleteButton->setIconSize(QSize(32, 32));
            deviceLayout->addWidget(deleteButton);

qtfa

Any idea what could be wrong, or am I missing something? Thanks

gamecreature commented 8 years ago

Hmmm very strange. I don't have a Linux environment to test it. Wat happens if you remove all the size options: (setFixedWidth, setIconSize.. etc??)

else please try the following workaround:

deleteButton->setIcon(awesome->icon(fa::beer).pixmap(32,32));
stefanchiriac commented 8 years ago

I removed everything and tried the workaround and still the same. If I put fa::beer that's how it looks like now screenshot from 2016-05-18 23-29-25

gamecreature commented 8 years ago

It just looks like as if the wrong font is used...? Did the loading of the TTF font succeed?

Are other controls working?

stefanchiriac commented 8 years ago

solved. Was initialized in the first window and on the 2nd window was not sharing the same instance

gamecreature commented 8 years ago

Thanks for posting the cause and closing this issue!! 👍🏻