# Can't hide browser sidebar

**URL:** <https://forums.ankiweb.net/t/cant-hide-browser-sidebar/20163>\
**Category:** Help\
**Created:** [May 21, 2022, 5:29pm UTC](https://forums.ankiweb.net/t/cant-hide-browser-sidebar/20163 "2022-05-21T17:29:30Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![moonlight](https://avatars.discourse-cdn.com/v4/letter/m/97f17d/32.png) [@moonlight](https://forums.ankiweb.net/u/moonlight)\
**Post date:** [May 21, 2022, 5:29pm UTC](https://forums.ankiweb.net/t/cant-hide-browser-sidebar/20163/1 "2022-05-21T17:29:30Z")

</div>

Since a long time ago, the checkbox to hide the browser sidebar is uncheckable, so that I can’t hide the Anki browser sidebar (a feature that rarely I use, and is occupying a large portion of my screen)

I know there is an option to slide the three dots to the left, but I want to completely disable the sidebar

How can I fix this? There is some CSS parameter that I can hide the sidebar? Or maybe in the Anki config files?

Version ⁨2.1.52  
QT: Qt5  
Python 3.10.4  
python-pyqt5 5.15.6-7  
python-pyqt6 6.3.0-1

(Already tried downgrading and the problem persisted)

Tried setting :

```auto
    def showSidebar(self) -> None:
        self.sidebarDockWidget.setVisible(False)

```

in /usr/lib/python3.10/site-packages/aqt/browser/browser.py, doen’t worked.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/2X/4/496850e4655387ba19fb5d4f41c07f1851632010.png)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/2X/5/52382b8f83c448b86a8c6ef0aec433ee9b653ec8.png)

---

<div class="post-metadata">

**Author:** ![kleinerpirat](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/kleinerpirat/32/19863_2.png) [@kleinerpirat](https://forums.ankiweb.net/u/kleinerpirat)\
**Post date:** [May 21, 2022, 6:58pm UTC](https://forums.ankiweb.net/t/cant-hide-browser-sidebar/20163/2 "2022-05-21T18:58:22Z")

</div>

That checkbox was removed because it didn’t seem particularly useful.

> [@moonlight](#):
>
> There is some CSS parameter that I can hide the sidebar?

The sidebar is a Qt widget, so it cannot be hidden with CSS I’m afraid.

---

<div class="post-metadata">

**Author:** ![abdo](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/abdo/32/654_2.png) [@abdo](https://forums.ankiweb.net/u/abdo)\
**Post date:** [May 22, 2022, 10:47am UTC](https://forums.ankiweb.net/t/cant-hide-browser-sidebar/20163/3 "2022-05-22T10:47:28Z")

</div>

There is actually another hidden checkbox to toggle the sidebar, accessible by right-clicking on the divider. But for some reason, it’s not checkable now.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/2X/c/cbbf83e28c121e48ccf5fdd5bc5f644043a2143e.png)

I found about this from Henrik’s comment here: [move remaining Filter button items into sidebar · ankitects/anki@b8d67cd · GitHub](https://github.com/ankitects/anki/commit/b8d67cdad54b933aafb310759f840cf82204e5f2#commitcomment-46798112)

---

<div class="post-metadata">

**Author:** ![BlackBeans](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/blackbeans/32/2283_2.png) [@BlackBeans](https://forums.ankiweb.net/u/BlackBeans)\
**Post date:** [May 22, 2022, 10:50am UTC](https://forums.ankiweb.net/t/cant-hide-browser-sidebar/20163/4 "2022-05-22T10:50:41Z")

</div>

Maybe the best thing would be for the sidebar to disappear when you resize it to a very small size, with the handle bar, and only leave that bar visible, so that you just have to resize it to make it appear again. Also, clicking that bar could toggle the visibility state. I would find it more ergonomic than having to open a pop-up menu and click on a checkbox.

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [May 23, 2022, 12:51am UTC](https://forums.ankiweb.net/t/cant-hide-browser-sidebar/20163/6 "2022-05-23T00:51:55Z")

</div>

I seem to recall Anki used to allow users to do exactly that. It resulted in quite a few support requests from users who’d hidden the sidebar and then couldn’t figure out how to restore it.

---

<div class="post-metadata">

**Author:** ![BlackBeans](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/blackbeans/32/2283_2.png) [@BlackBeans](https://forums.ankiweb.net/u/BlackBeans)\
**Post date:** [May 23, 2022, 5:46am UTC](https://forums.ankiweb.net/t/cant-hide-browser-sidebar/20163/7 "2022-05-23T05:46:07Z")

</div>

Software like Gimp, which usually have a lot of modal windows, that you can hide, also have a menu in the toolbar with each modal window and a checkbox, reflecting the visibility of that window. Maybe having the same thing would greatly help these users: “no matter how I made _something_ (dis)appear, I always know how to revert my action”. With that, a more ergonomic but somehow mysterious for some users way of resizing the sidebar can be kept.

---

<div class="post-metadata">

**Author:** ![oakkitten](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/oakkitten/32/10465_2.png) [@oakkitten](https://forums.ankiweb.net/u/oakkitten)\
**Post date:** [May 23, 2022, 2:31pm UTC](https://forums.ankiweb.net/t/cant-hide-browser-sidebar/20163/8 "2022-05-23T14:31:36Z")

</div>

I think simply making the handle protrude, maybe even slightly _over_ other elements, works rather well. Here’s how Gmail shows the handle of the right panel if you collapse it:

![image](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/2X/4/443f557738f755b9a1c1657ba04adf3057a58a3a.png)

Or one could place a button with “\>\>” in the top left that appears when the sidebar is collapsed.

---

<div class="post-metadata">

**Author:** ![moonlight](https://avatars.discourse-cdn.com/v4/letter/m/97f17d/32.png) [@moonlight](https://forums.ankiweb.net/u/moonlight)\
**Post date:** [May 23, 2022, 8:52pm UTC](https://forums.ankiweb.net/t/cant-hide-browser-sidebar/20163/9 "2022-05-23T20:52:55Z")

</div>

> That checkbox was removed because it didn’t seem particularly useful.

In resource limited computers, the browser window loads waaay faster if Anki hasn’t the paintask to load and display the sidebar (and, in my case, thousands of tags). I remember that from a old version when I was able to hide the sidebar.

---

<div class="post-metadata">

**Author:** ![Rumo](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/rumo/32/1505_2.png) [@Rumo](https://forums.ankiweb.net/u/Rumo)\
**Post date:** [May 23, 2022, 9:20pm UTC](https://forums.ankiweb.net/t/cant-hide-browser-sidebar/20163/10 "2022-05-23T21:20:23Z")

</div>

> [@dae](#):
>
> I seem to recall Anki used to allow users to do exactly that. It resulted in quite a few support requests from users who’d hidden the sidebar and then couldn’t figure out how to restore it.

Now with the View menu, there would be a more obvious place to find the restore action.

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [May 24, 2022, 3:35am UTC](https://forums.ankiweb.net/t/cant-hide-browser-sidebar/20163/11 "2022-05-24T03:35:51Z")

</div>

I seem to recall users sometimes managed to hide the sidebar via the Filter button and then couldn’t figure out how to restore it either, but that’s a decent point - it would hopefully be easier to find in the View menu.

---

<div class="post-metadata">

**Author:** ![ijgnd](https://avatars.discourse-cdn.com/v4/letter/i/bbe5ce/32.png) [@ijgnd](https://forums.ankiweb.net/u/ijgnd)\
**Post date:** [May 28, 2022, 4:30pm UTC](https://forums.ankiweb.net/t/cant-hide-browser-sidebar/20163/12 "2022-05-28T16:30:12Z")

</div>

there are at least two add-ons that allow to hide the sidebar that should work:

- [fastbar](https://ankiweb.net/shared/info/46611790)
- [Browser Maximize/Hide Table/Editor/Sidebar](https://ankiweb.net/shared/info/1819291495)

---

<div class="post-metadata">

**Author:** ![moonlight](https://avatars.discourse-cdn.com/v4/letter/m/97f17d/32.png) [@moonlight](https://forums.ankiweb.net/u/moonlight)\
**Post date:** [May 29, 2022, 2:42pm UTC](https://forums.ankiweb.net/t/cant-hide-browser-sidebar/20163/13 "2022-05-29T14:42:31Z")

</div>

Adapting from the addons:

```auto
def my_toggle_sidebar(self):
    new_state = False if self.sidebarDockWidget.isVisible() else True
    self.sidebarDockWidget.setVisible(new_state)

```

The code above worked when called by shortcut hook. How can I make it the default?

Tried:

```auto
def disable_sidebar(self):
    self.sidebarDockWidget.setVisible(False)

browser_menus_did_init.append(disable_sidebar)

```

But after toggling the sidebar to make it visible again

```auto
Caught exception:
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/aqt/browser/sidebar/tree.py", line 337, in mouseReleaseEvent
    self._on_search(index)
  File "/usr/lib/python3.10/site-packages/aqt/browser/sidebar/tree.py", line 440, in _on_search
    if item := self.model().item_for_index(index):
AttributeError: 'NoneType' object has no attribute 'item_for_index'

```

If I disable the sidebar by default, I get this error. How can I fix this?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [May 1, 2023, 4:14am UTC](https://forums.ankiweb.net/t/cant-hide-browser-sidebar/20163/14 "2023-05-01T04:14:39Z")

</div>


