No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Electron: hide menu Bar window

    Framework
    2
    2
    2236
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jmg1340 last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • A
        aifuxi last edited by

        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

        1 Reply Last reply Reply Quote 0
        • First post
          Last post