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. Qt Creator help navigation buttons with time delayed menus
Forum Updated to NodeBB v4.3 + New Features

Qt Creator help navigation buttons with time delayed menus

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 758 Views 1 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.
  • W Offline
    W Offline
    Will
    wrote on last edited by
    #1

    I'm looking to implement a pushbutton that has functionality similar to the Help navigation "<" ">" buttons used in QtCreator. These buttons have the down arrow indicating that they have an associated menu, however they behave slightly differently than a standard QButton with an assigned QMenu in that if you just click the button it behaves like a button without a menu (no menu shown), however if you click and hold the button then the menu is shown.

    I've been looking through the QtCreator code but haven't found the code to see how they did it. Does anyone have any ideas how it was done? 0_1521563994323_2018-03-20_113922.png

    aha_1980A 1 Reply Last reply
    0
    • W Will

      I'm looking to implement a pushbutton that has functionality similar to the Help navigation "<" ">" buttons used in QtCreator. These buttons have the down arrow indicating that they have an associated menu, however they behave slightly differently than a standard QButton with an assigned QMenu in that if you just click the button it behaves like a button without a menu (no menu shown), however if you click and hold the button then the menu is shown.

      I've been looking through the QtCreator code but haven't found the code to see how they did it. Does anyone have any ideas how it was done? 0_1521563994323_2018-03-20_113922.png

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi @Will,

      I cannot check right now but I think these are QToolButtons.

      Regards

      Qt has to stay free or it will die.

      W 1 Reply Last reply
      1
      • aha_1980A aha_1980

        Hi @Will,

        I cannot check right now but I think these are QToolButtons.

        Regards

        W Offline
        W Offline
        Will
        wrote on last edited by
        #3

        @aha_1980 You are right.

        QToolButton::DelayedPopup After pressing and holding the tool button down for a certain amount of time (the timeout is style dependent, see QStyle::SH_ToolButton_PopupDelay), the menu is displayed.
        

        I'll see if I can implement this feature in a regular QButton.

        aha_1980A 1 Reply Last reply
        0
        • W Will

          @aha_1980 You are right.

          QToolButton::DelayedPopup After pressing and holding the tool button down for a certain amount of time (the timeout is style dependent, see QStyle::SH_ToolButton_PopupDelay), the menu is displayed.
          

          I'll see if I can implement this feature in a regular QButton.

          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Will I think you can use a QToolButton as "regular button" ;)

          Qt has to stay free or it will die.

          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