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. UI: customizable toolbar
Forum Updated to NodeBB v4.3 + New Features

UI: customizable toolbar

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.8k 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.
  • M Offline
    M Offline
    midenok
    wrote on last edited by
    #1

    Is it possible to create with Qt5 customizable toolbars like in Microsoft Office, where you can drag toolbars, change their size and shape, add and remove buttons by dragging them in special 'customize' mode.

    To those, who didn't use MSOffice for a long time I should remind -- I'm asking about runtime phase, not the development phase. So please, don't suggest me to drag buttons in QT Designer...

    1 Reply Last reply
    0
    • T Offline
      T Offline
      thEClaw
      wrote on last edited by
      #2

      I have not managed to implement the dragging of icons (inside the toolbar), but removing, inserting and of course moving the toolbar itself is possible and not too difficult to do. I posted about that one or two weeks ago, and I managed to get it working relatively fast.
      I don't think you can do it without coding some things, though.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        midenok
        wrote on last edited by
        #3

        Can your toolbar change size and shape? I.e. you drag the edge and it becomes narrower and taller and icons rearrange.

        The question is still open. Can icons be dragged inside toolbar and to and from?

        1 Reply Last reply
        0
        • T Offline
          T Offline
          thEClaw
          wrote on last edited by
          #4

          What are you talking about? If you invest a little work, you can do all of these, except the "dragging inside". That's probably possible, too, somehow. I haven't invested too much time into getting it to work yet, though.

          If you drag the edge of the toolbar, it becomes smaller. If it becomes too small to show all its icons, an arrow is added at the end which makes the other icons available via a menu.
          You can move the toolbar around inside the window (for free, since that's standard behavior), position it at different places, put a couple of them together, etc.

          Adding/inserting buttons via drag&drop is no problem, for removing I chose to use a context menu.

          Maybe this answers your question: There is no drag&drop out-of-the-box, except for dragging the toolbar itself. Changing size is possible.

          If you need it to be more customizable, you could always subclass QWidget/QFrame or maybe even QMenu and do things yourself. Drag&Drop is pretty easy in Qt, once you understood the principle.

          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