Maximize (not fullscreen) your cross-platform desktop application
If not for macOS "fullscreen" (and some Linux), it wouldn't be a pain.
I have realize the solution for a while, with Golang and Lorca. Nonetheless, it uses cgo
.
If not for macOS "fullscreen" (and some Linux), it wouldn't be a pain.
I have realize the solution for a while, with Golang and Lorca. Nonetheless, it uses cgo
.
And it also allows C compiling to binary, as long as you can get the right setup.
I use this with Node better-sqlite3, where prebuilt binary for Windows is not working (with Electron), and I am running development on MacOS.
This is what I have got:
from ui.mainWindow import MainWindow
from webview.controller import initServer
from PyQt5.QtWidgets import *
import sys
import httplib2
from time import sleep
if _<i>name_</i> == '__main__':
initServer().start()
h = httplib2.Http()
while True:
try:
resp = h.request("http://0.0.0.0:8080/", 'HEAD')
break
except ConnectionRefusedError:
sleep(1)
continue
app = QApplication(sys.argv)
window = MainWindow()
window.showUI()
window.setBaseSize(1000, 600)
window.move(QDesktopWidget().rect().center().x()-window.rect().center().x(), window.rect().y())
sys.exit(app.exec_())