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

Toggle() on QDockWidget::toggleViewAction() is not working

    XMLWordPrintable

    Details

    • Platform/s:
      Windows
    • Commits:
      de6520805abafbc6f898b3fec043e5d85827dfd0 (qt/qtbase/5.15)

      Description

      QdockWidget:: toggleViewAction(), dockwidget’s visibility is toggled on triggered() signal whereas it could/should be toggled() signal as user wants to control the dock visibility with some property, say checked.
      If you set action.setChecked(true) or action.toggle(), it does not make any impact on dock’s visibility. Like in qdockWidget.cpp, line no. 679, we have

        QObject::connect(toggleViewAction, SIGNAL(triggered(bool)), q, SLOT(_q_toggleView(bool)));
      

      Like if you try,

          b = w1->toggleViewAction();
          qDebug()<< b->isChecked();  // false, which seems incorrect
          // Following code does not make any difference as toggle does not emit triggered signal
          b->setChecked(false); 
          b->toggle();
      

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            vhilshei Volker Hilsheimer
            Reporter:
            shmittal Shveta Mittal
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes