# Add icons for self-created toolbar

**URL:** https://discourse.paraview.org/t/add-icons-for-self-created-toolbar/4329
**Category:** ParaView Support
**Created:** [May 14, 2020, 12:33pm UTC](https://discourse.paraview.org/t/add-icons-for-self-created-toolbar/4329 "2020-05-14T12:33:50Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Yoshino](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/y/bcef8e/32.png) [@Yoshino](https://discourse.paraview.org/u/Yoshino)
#### Post date: [May 14, 2020, 12:33pm UTC](https://discourse.paraview.org/t/add-icons-for-self-created-toolbar/4329/1 "2020-05-14T12:33:50Z")

</div>

I’m building my toolbar by virtue of paraview’s _ **Reaction** _ mechanism. And all the actions hold in an ActionGroup got instantiated through corresponding _ **pqReactions** _, the problem is that the icon I add won’t show up and I’m not sure if this is a CMake issue or ParaView one.  
I think that I should probably add something in my _CMakeLists.txt_ but not sure where or how since I use ParaView macro _paraview\_client\_add_ to customize app.

Thanks for any guidance.

Yoshino

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [May 15, 2020, 1:55am UTC](https://discourse.paraview.org/t/add-icons-for-self-created-toolbar/4329/2 "2020-05-15T01:55:23Z")

</div>

Looks like a Qt usability issue to me.  
Does the button show up ? even without an icon.

---

<div class="post-metadata">

### Author: ![Yoshino](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/y/bcef8e/32.png) [@Yoshino](https://discourse.paraview.org/u/Yoshino)
#### Post date: [May 15, 2020, 2:01am UTC](https://discourse.paraview.org/t/add-icons-for-self-created-toolbar/4329/3 "2020-05-15T02:01:12Z")

</div>

Yes, the button shows in the toolbar and function well, with text when hovered. When I set the icon to Qt standard(e.g. _QStyle::SP\_MessageBoxCritical_), it shows up correctly. So I bet it’s about adding resource to cmake project.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [May 15, 2020, 2:15am UTC](https://discourse.paraview.org/t/add-icons-for-self-created-toolbar/4329/4 "2020-05-15T02:15:11Z")

</div>

indeed unrelated to ParaView completely.

> **[Adding qrc icon resource to a CMake Qt project](https://forum.qt.io/topic/91984/adding-qrc-icon-resource-to-a-cmake-qt-project/2)**
>
> Hey, I'm currently trying to add a icon to my cmake project, to be able to use it as SystemTrayIcon, it works fine when using qmake via Hierarchy: resources.qrc /icons myicon.ico .pro RESOURCES += \\ resource.qrc icon code: auto...
