visibility of docks cannot be toggled when menubar is hidden

Bug #1936793 reported by Gregor Feierabend
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qpdfview
New
Undecided
Unassigned

Bug Description

Bug description:

Visibility of docks cannot be toggled when menubar is hidden.

Reproducible:

Always.

Proposed solution:

I think this is a problem with Qt. As a workround I just toggle the height of the menubar between 0 and QWIDGETSIZE_MAX. In Gentoo I apply the following user patch:

diff --git a/sources/mainwindow.cpp b/sources/mainwindow.cpp
index 02ac3fd..707abe6 100644
--- a/sources/mainwindow.cpp
+++ b/sources/mainwindow.cpp
@@ -2227,7 +2227,7 @@ void MainWindow::on_toggleToolBars_triggered(bool checked)

 void MainWindow::on_toggleMenuBar_triggered(bool checked)
 {
- menuBar()->setVisible(checked);
+ menuBar()->setMaximumHeight(checked ? QWIDGETSIZE_MAX : 0);
 }

 void MainWindow::on_searchInitiated(const QString& text, bool modified)

To apply this manually in a non-git repository the patchfile can be placed in the root of the project directory and be applied as follows:

patch -p1 < qpdfview-0.4.18-qt-5.15.patch

System Information:

qpdfview version: 0.4.18
build-time options: CONFIG+="without_synctex without_ps"
operating system: Gentoo Linux
installed dependencies:

   -- net-print/cups-2.3.3_p2-r2 (net-print/cups) amd64
   -- app-text/djvu-3.5.28-r1 (app-text/djvu) amd64
   -- app-text/mupdf-1.18.0-r4 (>=app-text/mupdf-1.7) amd64
   -- app-text/libspectre-0.2.9 (app-text/libspectre) amd64
   -- dev-qt/qtconcurrent-5.15.2 (dev-qt/qtconcurrent) amd64
   -- dev-qt/qtcore-5.15.2-r2 (dev-qt/qtcore) amd64
   -- dev-qt/qtgui-5.15.2-r1 (dev-qt/qtgui) amd64
   -- dev-qt/qtprintsupport-5.15.2 (dev-qt/qtprintsupport) amd64 [cups?]
   -- dev-qt/qtwidgets-5.15.2 (dev-qt/qtwidgets) amd64
   -- dev-qt/qtdbus-5.15.2 (dev-qt/qtdbus) amd64
   -- app-text/poppler-21.05.0 (>=app-text/poppler-0.35) amd64 [qt5]
   -- dev-qt/qtxml-5.15.2 (dev-qt/qtxml) amd64
   -- dev-qt/qtsql-5.15.2 (dev-qt/qtsql) amd64 [sqlite]
   -- dev-qt/qtsvg-5.15.2 (dev-qt/qtsvg) amd64
   -- virtual/freedesktop-icon-theme-0-r4 (virtual/freedesktop-icon-theme) amd64
   -- app-text/texlive-core-2021 (app-text/texlive-core) amd64
   -- dev-util/desktop-file-utils-0.26-r1 (dev-util/desktop-file-utils) amd64
   -- x11-misc/shared-mime-info-2.0-r2 (x11-misc/shared-mime-info) amd64
   -- dev-qt/linguist-tools-5.15.2 (dev-qt/linguist-tools) amd64
   -- virtual/pkgconfig-2 (virtual/pkgconfig) amd64

Revision history for this message
Gregor Feierabend (gregex) wrote :
Revision history for this message
Gregor Feierabend (gregex) wrote :

The command to apply the patch manually must of course be:

patch -p1 < qpdfview-0.4.18-menubar.patch

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.