Display name when hover over plugin icon in QGIS












3















I have made a QGIS plugin (Python) and when I hover my mouse/cursor over the icon in QGIS the name of the plugin seem to be "Plugins Toolbar". I have searched all .py scripts in the directory of the plugin and can't find any reference to "Plugins Toolbar".



How do I change the name of this "icon text"?



See picture










share|improve this question





























    3















    I have made a QGIS plugin (Python) and when I hover my mouse/cursor over the icon in QGIS the name of the plugin seem to be "Plugins Toolbar". I have searched all .py scripts in the directory of the plugin and can't find any reference to "Plugins Toolbar".



    How do I change the name of this "icon text"?



    See picture










    share|improve this question



























      3












      3








      3








      I have made a QGIS plugin (Python) and when I hover my mouse/cursor over the icon in QGIS the name of the plugin seem to be "Plugins Toolbar". I have searched all .py scripts in the directory of the plugin and can't find any reference to "Plugins Toolbar".



      How do I change the name of this "icon text"?



      See picture










      share|improve this question
















      I have made a QGIS plugin (Python) and when I hover my mouse/cursor over the icon in QGIS the name of the plugin seem to be "Plugins Toolbar". I have searched all .py scripts in the directory of the plugin and can't find any reference to "Plugins Toolbar".



      How do I change the name of this "icon text"?



      See picture







      qgis python qgis-plugins






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 25 at 12:19









      Vince

      14.7k32749




      14.7k32749










      asked Jan 25 at 10:26









      SunTourSunTour

      313




      313






















          1 Answer
          1






          active

          oldest

          votes


















          5














          In your plugin.py file (or whatever you named the main file), look inside the initGui() function. You'll want to change the text parameter for the icon::



          def initGui(self):
          """Create the menu entries and toolbar icons inside the QGIS GUI."""

          icon_path = ':/plugins/example/icon.png'
          self.add_action(
          icon_path,
          text=self.tr(u'Plugin_button'),
          callback=self.run,
          parent=self.iface.mainWindow())





          share|improve this answer



















          • 1





            You are quick, I was writing the same answer :). Just I want to add that the OP should reload the plugin using the Plugin Reloader to see the changes.

            – ahmadhanb
            Jan 25 at 10:55






          • 1





            @ahmadhanb - I had my coffee :). Thank you for your tip, the plugin should indeed be reloaded such as with the Plugin Reloader... plugin.

            – Joseph
            Jan 25 at 10:59






          • 2





            @SunTour Please accept the answer if it solved your problem.

            – ahmadhanb
            Jan 25 at 11:13











          • How do i "accept" the answer? I am a bit new here..

            – SunTour
            Jan 26 at 13:00











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "79"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f309868%2fdisplay-name-when-hover-over-plugin-icon-in-qgis%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          5














          In your plugin.py file (or whatever you named the main file), look inside the initGui() function. You'll want to change the text parameter for the icon::



          def initGui(self):
          """Create the menu entries and toolbar icons inside the QGIS GUI."""

          icon_path = ':/plugins/example/icon.png'
          self.add_action(
          icon_path,
          text=self.tr(u'Plugin_button'),
          callback=self.run,
          parent=self.iface.mainWindow())





          share|improve this answer



















          • 1





            You are quick, I was writing the same answer :). Just I want to add that the OP should reload the plugin using the Plugin Reloader to see the changes.

            – ahmadhanb
            Jan 25 at 10:55






          • 1





            @ahmadhanb - I had my coffee :). Thank you for your tip, the plugin should indeed be reloaded such as with the Plugin Reloader... plugin.

            – Joseph
            Jan 25 at 10:59






          • 2





            @SunTour Please accept the answer if it solved your problem.

            – ahmadhanb
            Jan 25 at 11:13











          • How do i "accept" the answer? I am a bit new here..

            – SunTour
            Jan 26 at 13:00
















          5














          In your plugin.py file (or whatever you named the main file), look inside the initGui() function. You'll want to change the text parameter for the icon::



          def initGui(self):
          """Create the menu entries and toolbar icons inside the QGIS GUI."""

          icon_path = ':/plugins/example/icon.png'
          self.add_action(
          icon_path,
          text=self.tr(u'Plugin_button'),
          callback=self.run,
          parent=self.iface.mainWindow())





          share|improve this answer



















          • 1





            You are quick, I was writing the same answer :). Just I want to add that the OP should reload the plugin using the Plugin Reloader to see the changes.

            – ahmadhanb
            Jan 25 at 10:55






          • 1





            @ahmadhanb - I had my coffee :). Thank you for your tip, the plugin should indeed be reloaded such as with the Plugin Reloader... plugin.

            – Joseph
            Jan 25 at 10:59






          • 2





            @SunTour Please accept the answer if it solved your problem.

            – ahmadhanb
            Jan 25 at 11:13











          • How do i "accept" the answer? I am a bit new here..

            – SunTour
            Jan 26 at 13:00














          5












          5








          5







          In your plugin.py file (or whatever you named the main file), look inside the initGui() function. You'll want to change the text parameter for the icon::



          def initGui(self):
          """Create the menu entries and toolbar icons inside the QGIS GUI."""

          icon_path = ':/plugins/example/icon.png'
          self.add_action(
          icon_path,
          text=self.tr(u'Plugin_button'),
          callback=self.run,
          parent=self.iface.mainWindow())





          share|improve this answer













          In your plugin.py file (or whatever you named the main file), look inside the initGui() function. You'll want to change the text parameter for the icon::



          def initGui(self):
          """Create the menu entries and toolbar icons inside the QGIS GUI."""

          icon_path = ':/plugins/example/icon.png'
          self.add_action(
          icon_path,
          text=self.tr(u'Plugin_button'),
          callback=self.run,
          parent=self.iface.mainWindow())






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 25 at 10:49









          JosephJoseph

          57.8k7100199




          57.8k7100199








          • 1





            You are quick, I was writing the same answer :). Just I want to add that the OP should reload the plugin using the Plugin Reloader to see the changes.

            – ahmadhanb
            Jan 25 at 10:55






          • 1





            @ahmadhanb - I had my coffee :). Thank you for your tip, the plugin should indeed be reloaded such as with the Plugin Reloader... plugin.

            – Joseph
            Jan 25 at 10:59






          • 2





            @SunTour Please accept the answer if it solved your problem.

            – ahmadhanb
            Jan 25 at 11:13











          • How do i "accept" the answer? I am a bit new here..

            – SunTour
            Jan 26 at 13:00














          • 1





            You are quick, I was writing the same answer :). Just I want to add that the OP should reload the plugin using the Plugin Reloader to see the changes.

            – ahmadhanb
            Jan 25 at 10:55






          • 1





            @ahmadhanb - I had my coffee :). Thank you for your tip, the plugin should indeed be reloaded such as with the Plugin Reloader... plugin.

            – Joseph
            Jan 25 at 10:59






          • 2





            @SunTour Please accept the answer if it solved your problem.

            – ahmadhanb
            Jan 25 at 11:13











          • How do i "accept" the answer? I am a bit new here..

            – SunTour
            Jan 26 at 13:00








          1




          1





          You are quick, I was writing the same answer :). Just I want to add that the OP should reload the plugin using the Plugin Reloader to see the changes.

          – ahmadhanb
          Jan 25 at 10:55





          You are quick, I was writing the same answer :). Just I want to add that the OP should reload the plugin using the Plugin Reloader to see the changes.

          – ahmadhanb
          Jan 25 at 10:55




          1




          1





          @ahmadhanb - I had my coffee :). Thank you for your tip, the plugin should indeed be reloaded such as with the Plugin Reloader... plugin.

          – Joseph
          Jan 25 at 10:59





          @ahmadhanb - I had my coffee :). Thank you for your tip, the plugin should indeed be reloaded such as with the Plugin Reloader... plugin.

          – Joseph
          Jan 25 at 10:59




          2




          2





          @SunTour Please accept the answer if it solved your problem.

          – ahmadhanb
          Jan 25 at 11:13





          @SunTour Please accept the answer if it solved your problem.

          – ahmadhanb
          Jan 25 at 11:13













          How do i "accept" the answer? I am a bit new here..

          – SunTour
          Jan 26 at 13:00





          How do i "accept" the answer? I am a bit new here..

          – SunTour
          Jan 26 at 13:00


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Geographic Information Systems Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f309868%2fdisplay-name-when-hover-over-plugin-icon-in-qgis%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Mario Kart Wii

          What does “Dominus providebit” mean?

          Antonio Litta Visconti Arese