Icon in the tab

Added by Mahmudul Hasan 27 days ago

I am trying to add icon to the tab as below -

The code executes well but i can't see any icon :(

m_firstTab = m_tabWidget->addTab(std::move(firstTabContent), tr("str.firsttab"));
m_firstTab->setIcon("resources/assets/images/snow.png");

Resource is in place and it's 16 x 16.

Is this a bug or i am trying in the wrong way.


Replies (5)

RE: Icon in the tab - Added by lm at 27 days ago

A few more debugging steps: Do your server logs indicate that the image is being served? Does the browser indicate that the image is being successfully fetched? When you view the webpage source, do you see where the icon should be?

RE: Icon in the tab - Added by Mahmudul Hasan 27 days ago

- The log has no error regarding image not loaded
- The source shows the image is in proper location

Please see the attachment

ImgProperties.png (11.4 KB)

RE: Icon in the tab - Added by Mahmudul Hasan 27 days ago

Another attachment

BrowserSource.png (54.1 KB)

RE: Icon in the tab - Added by Wim Dumon 24 days ago

Hello,

In the network tab, do you see the image being loaded? With result code 200 or 404 (not found)?

Wim.

RE: Icon in the tab - Added by Mahmudul Hasan 24 days ago

result is 200. But i can't see it on the page!

network.png (24.4 KB)

imageNotShowing.png (4.28 KB)

(1-5/5)