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. QMenubar::resizeevent is not called when i add menu in existing menubar
Forum Update on Monday, May 27th 2025

QMenubar::resizeevent is not called when i add menu in existing menubar

Scheduled Pinned Locked Moved General and Desktop
9 Posts 3 Posters 2.4k 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.
  • Y Offline
    Y Offline
    yhodage
    wrote on last edited by
    #1

    Hi ,

    i am adding the extra menu on the existing menubar but after that the resizeevent of QMenubar is not called.
    currently i am porting my application from qt 3.0 to qt 4.8 . in qt 3.0 it works fine and resize event called properly when i add menu in existing menubar.
    so my question is will the resize event of QMenubar will call if i add extra menu in that?

    Thanks,
    Yogesh

    1 Reply Last reply
    0
    • Y Offline
      Y Offline
      yhodage
      wrote on last edited by
      #2

      is anybody know this problem?

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        What is the exact problem you have with resizeEvent not being called ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • Y Offline
          Y Offline
          yhodage
          wrote on last edited by
          #4

          Hi ,

          in my application i have menubar and toolber on the top of the window. if one extra menu added in existing menubar then i just move toolbar and add new menu in menubar horizontal. it works fine in qt 3.0
          now when i try to add new menu the resize event of menubar would not called. the toolbar move logic implemented in the resize event of meunbar.

          Thanks
          Yogesh

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Then it might be a regression.

            You should check the "bug report system":http://bugreports.qt-project.org to see whether it's a known issue. If not you can consider opening a new bug report providing a Minimal Compilable example that shows the behavior.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • E Offline
              E Offline
              EverydayDiesel
              wrote on last edited by
              #6

              Might be a dumb question but how do you add a resize event to a form?

              I opened up the .cpp and add this code

              @
              void MainWindow::Resize(void)
              {
              QMessageBox::about(this, "test", "test");
              }
              @

              and added the header also
              @
              private slots:
              void Resize(void);
              @

              but the event never fires. What am I doing wrong?

              1 Reply Last reply
              0
              • E Offline
                E Offline
                EverydayDiesel
                wrote on last edited by
                #7

                Might be a dumb question but how do you add a resize event to a form?

                I opened up the .cpp and add this code

                @
                void MainWindow::Resize(void)
                {
                QMessageBox::about(this, "test", "test");
                }
                @

                and added the header also
                @
                private slots:
                void Resize(void);
                @

                but the event never fires. What am I doing wrong?

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  "That":http://doc.qt.io/qt-5/qwidget.html#resizeEvent is the correct signature for resizeEvent

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    "That":http://doc.qt.io/qt-5/qwidget.html#resizeEvent is the correct signature for resizeEvent

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    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