7

I am developing a program (TeXamator) in Python to deal with exercises databases in LaTeX. Following this answer I have been able to successfully embed okular into my Qt app.

The problem is that I can't find how to access the sidebar and hide it. If I open okular, press F7 to hide/show the side bar and then go back to my app, then the side bar will be hidden/shown depending on its status when closing okular.

I've tried looking at the code of "okularpart" but I can't find anything useful.

Could someone please point me in the right direction ?

Thanks in advance.

Edit : after going through okular's source code, I understand that I should set the visibility of "m_toolbar" to False, but I don't know in which namespace it is (and if it is even accessible). I've tried hiding each child of okupart.widget() (one by one), it hid a few things but not the sidebar.

Community
  • 1
  • 1
Alexis
  • 73
  • 8

1 Answers1

0

I would expect to find it in the configuration list (since it's reachable by Settings->Navigation panel), so it won't be a widget. An alternative solution would be also to make it as small as possible.

Try to use something like

okupart.sidebar().setSidebarVisibility(false)

Check Sidebar::setSidebarVisibility and this corresponding call.

Michael Mior
  • 28,107
  • 9
  • 89
  • 113
FieryCat
  • 1,875
  • 18
  • 28
  • Thanks but that's where I'm stuck : I've been trying to dir() almost everything and can't find a "sidebar" in the different namespaces – Alexis Jun 07 '17 at 07:59