Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-138183

The drop area for QToolBar gets triggered even when the toolbar is not on the window.

XMLWordPrintable

    • Linux/X11, Windows
    • 6b9d86fce (dev), c41eafd9c (6.10), b03180d78 (6.9), 4ce1097cb (tqtc/lts-6.8)

      The drop area for QToolBar gets triggered even when the toolbar is outside the window. This issue occurs when moving the toolbar to the left or top (vertically)of the window, but not when moving it to the right or bottom (vertically).

      Expected behavior: drop Area shouldn't be enabled when the toolbar is outside of the window.

      To reproduce the issue run the code below:

      #include <QApplication> 
      #include <QMainWindow> 
      #include <QToolBar>
      int main(int argc, char *argv[]) {     
      qDebug() << "Qt version:" << QT_VERSION_STR;          
      QApplication app(argc, argv);          
      QMainWindow win;     
      win.resize(600, 400);     
      QToolBar *toolbar = new QToolBar("Main Toolbar", &win);     
      QAction *newAction = toolbar->addAction("New");     
      QAction *openAction = toolbar->addAction("Open");     
      win.addToolBar(Qt::TopToolBarArea, toolbar);          
      win.show();          
      return app.exec(); 
      }
       

      I have attached a video that demonstrates the behavior

        1. ToolBardropArea.mp4
          5.82 MB
          Mehdi Belila
        2. QTBUG-138183.zip
          2 kB
          Mehdi Belila
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            xavierbesson Xavier Besson
            mahdi.belila Mehdi Belila
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: