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. How to implement a pop-up slider in menu?
Forum Updated to NodeBB v4.3 + New Features

How to implement a pop-up slider in menu?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 3.9k 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.
  • L Offline
    L Offline
    liuyanghejerry
    wrote on 2 Oct 2012, 05:20 last edited by
    #1

    Hi, I'm simulator Adobe Illustrator and have problem when try to implement a widget that a menu that can pops up another widget, such as a slider.

    image:

    !http://pic.yupoo.com/liuyanghejerry/Cjgk5Yx7/OZx8Z.png(wanted effect)!

    Any idea to implement it? Or should I just start from looking QMenu's source code? Thanks.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on 2 Oct 2012, 05:37 last edited by
      #2

      This is certainly possible to do.
      The first step would be to create the popup button. I'd look at "this example":http://blog.qt.digia.com/2007/06/06/lineedit-with-a-clear-button/ for starters on how you can trick Qt to put a button inside a line edit.

      The next step is the actual popup widget. For that, you can use some window flags. You create the widget without a parent and with the Qt::Popup window flags. Then, you position it so that it appears right under the lineedit-with-button widget. Put a slider on top, and you're in business.

      1 Reply Last reply
      0
      • L Offline
        L Offline
        liuyanghejerry
        wrote on 2 Oct 2012, 05:57 last edited by
        #3

        [quote author="Andre" date="1349156271"]This is certainly possible to do.
        The first step would be to create the popup button. I'd look at "this example":http://blog.qt.digia.com/2007/06/06/lineedit-with-a-clear-button/ for starters on how you can trick Qt to put a button inside a line edit.

        The next step is the actual popup widget. For that, you can use some window flags. You create the widget without a parent and with the Qt::Popup window flags. Then, you position it so that it appears right under the lineedit-with-button widget. Put a slider on top, and you're in business.[/quote]

        Thanks! I think this is the way to go.

        1 Reply Last reply
        0

        1/3

        2 Oct 2012, 05:20

        • Login

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