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.


Log in to reply