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. Is it possible to implement something like this?
Forum Updated to NodeBB v4.3 + New Features

Is it possible to implement something like this?

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 3 Posters 166 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.
  • T Offline
    T Offline
    Thomas Stein
    wrote on last edited by Thomas Stein
    #1
    This post is deleted!
    1 Reply Last reply
    0
    • S Offline
      S Offline
      SimonSchroeder
      wrote on last edited by SimonSchroeder
      #3

      I guess it is quite simple as tool buttons are made to have an optional menu in Qt. Have a look at the documentation for QToolButton. It has a funtion setMenu(QMenu*). I guess this is what you are looking for (I have never used this feature myself, so I am not entirely sure if this is the right function).

      If you are creating your toolbar from QActions, QAction also has a setMenu(QMenu*) function. I would assume it works the same if you add the action to the toolbar.

      1 Reply Last reply
      6
      • sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #2

        Yes, you can create a custom QWidget subclass for this (or maybe even a QMenu subclass).

        (Z(:^

        1 Reply Last reply
        1
        • S Offline
          S Offline
          SimonSchroeder
          wrote on last edited by SimonSchroeder
          #3

          I guess it is quite simple as tool buttons are made to have an optional menu in Qt. Have a look at the documentation for QToolButton. It has a funtion setMenu(QMenu*). I guess this is what you are looking for (I have never used this feature myself, so I am not entirely sure if this is the right function).

          If you are creating your toolbar from QActions, QAction also has a setMenu(QMenu*) function. I would assume it works the same if you add the action to the toolbar.

          1 Reply Last reply
          6

          • Login

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