Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. is it possible to create a floating menu in Pysid2?

is it possible to create a floating menu in Pysid2?

Scheduled Pinned Locked Moved Unsolved Qt for Python
4 Posts 2 Posters 805 Views
  • 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.
  • F Offline
    F Offline
    franzinBr
    wrote on last edited by
    #1

    hello, I'm developing a program that needs a hidden menu that appears when you press a button.

    The only solution I found available was the Toggles menus, which to be implemented just change the width of the frame. like this:

    2fccda6f-dcb4-49e8-bc04-3f716ac3f50a-image.png
    d4c58f94-6704-4116-9d88-6eab08e0f24c-image.png

    however this solution resizes the other screen widgets.
    I need that the menu appears floating on the screen without interfering with the size of the other items. Like this:

    ff371275-d1e8-4a5d-93a2-b518095dfadd-image.png

    is it possible to create this in pyqt5 / pyside2? Thanks

    jsulmJ 1 Reply Last reply
    0
    • F franzinBr

      hello, I'm developing a program that needs a hidden menu that appears when you press a button.

      The only solution I found available was the Toggles menus, which to be implemented just change the width of the frame. like this:

      2fccda6f-dcb4-49e8-bc04-3f716ac3f50a-image.png
      d4c58f94-6704-4116-9d88-6eab08e0f24c-image.png

      however this solution resizes the other screen widgets.
      I need that the menu appears floating on the screen without interfering with the size of the other items. Like this:

      ff371275-d1e8-4a5d-93a2-b518095dfadd-image.png

      is it possible to create this in pyqt5 / pyside2? Thanks

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @franzinBr Simply use https://doc.qt.io/qt-5/qmenu.html

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      F 1 Reply Last reply
      2
      • jsulmJ jsulm

        @franzinBr Simply use https://doc.qt.io/qt-5/qmenu.html

        F Offline
        F Offline
        franzinBr
        wrote on last edited by
        #3

        @jsulm Thanks for the reply, but I believe that Qmenu does not fit what I need, since it is not possible to add LineEdit, QComboBox and other widgets to QMenu :/

        jsulmJ 1 Reply Last reply
        0
        • F franzinBr

          @jsulm Thanks for the reply, but I believe that Qmenu does not fit what I need, since it is not possible to add LineEdit, QComboBox and other widgets to QMenu :/

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @franzinBr See in the documentation:
          "Widgets can be inserted into menus with the QWidgetAction class. Instances of this class are used to hold widgets, and are inserted into menus with the addAction() overload that takes a QAction. If the QWidgetAction fires the triggered() signal, the menu will close."

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          2

          • Login

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