Electron: hide menu Bar window
-
Hi.
How can I hide the top menuBar window when I build in Electron mode?
I’ve been watching this.$q.electron object and seen the following properties- “context.menuBar”
- “context.window.menuBar”
but they are “read only”.
I’ve been looking for that question, and I’ve found in electronjs.org the following method:
const { BrowserWindow } = require('electron') const win = new BrowserWindow() win.setMenuBarVisibility(false)
I’ve put this code in created property of layout component but when I run, it says that “BrowserWindow” is not a constructor.
May be, the solution it’s something about configuration in quasar.config.js… I don`t know.
I run it on windows OS.
Thank you in advance.
-
I just encountered the same problem as you, but I solved it.
Hope it can help you. just find “src-electron/main-process/electron-main.js”, After initial window options, we got “mainWindow” object like “BrowserWindow” , then you can use “mainWindow.setMenuBarVisibility(false)” to hide the top menuBar