Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QToolbar tooltip
Qt 6.11 is out! See what's new in the release blog

QToolbar tooltip

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 2.0k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    amezei
    wrote on last edited by
    #1

    Hi!

    Is there an option to show the tooltip text when the app window is not in focus? (not the active window) I need it f.e. by the toolbar actions.

    Thank for the reply.

    raven-worxR 1 Reply Last reply
    0
    • A amezei

      Hi!

      Is there an option to show the tooltip text when the app window is not in focus? (not the active window) I need it f.e. by the toolbar actions.

      Thank for the reply.

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by raven-worx
      #2

      @amezei
      Try:

      toolBar->setAttribute( Qt::WA_AlwaysShowToolTips );
      

      if that doesn't work, then try

      toolBar->window()->setAttribute( Qt::WA_AlwaysShowToolTips );
      

      and if that also doesnt't work try the following:

      foreach( QWIdget* w, toolBar->findChildren<QWidget*>() )
          w->setAttribute( Qt::WA_AlwaysShowToolTips );
      

      :)
      sry, but i am not 100% sure where Qt expects the attribute to be set.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      A 1 Reply Last reply
      3
      • raven-worxR raven-worx

        @amezei
        Try:

        toolBar->setAttribute( Qt::WA_AlwaysShowToolTips );
        

        if that doesn't work, then try

        toolBar->window()->setAttribute( Qt::WA_AlwaysShowToolTips );
        

        and if that also doesnt't work try the following:

        foreach( QWIdget* w, toolBar->findChildren<QWidget*>() )
            w->setAttribute( Qt::WA_AlwaysShowToolTips );
        

        :)
        sry, but i am not 100% sure where Qt expects the attribute to be set.

        A Offline
        A Offline
        amezei
        wrote on last edited by
        #3

        @raven-worx said in QToolbar tooltip:

        Qt::WA_AlwaysShowToolTips

        Thank you for the answer!
        The second one worked for me, but the method name is setAttribute()! (I use other Qt version maybe :))

        raven-worxR 1 Reply Last reply
        0
        • A amezei

          @raven-worx said in QToolbar tooltip:

          Qt::WA_AlwaysShowToolTips

          Thank you for the answer!
          The second one worked for me, but the method name is setAttribute()! (I use other Qt version maybe :))

          raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by
          #4

          @amezei said in QToolbar tooltip:

          The second one worked for me, but the method name is setAttribute()! (I use other Qt version maybe :))

          yes, of course. I was typing it just from the top of my head, so i mixed it up.
          (corrected it in my post)

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved