You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Promises don't resolve until a QT event is raised. #864
Describe the bug
Promises queue up and don't resolve until a QT event is raised.
To Reproduce
import{QAction,QIcon,QMenu,QSystemTrayIcon}from"@nodegui/nodegui";import{resolve}from"path";consttrayMenu=newQMenu();conststatusAction=newQAction();statusAction.setText("Action");statusAction.setEnabled(false);trayMenu.addAction(statusAction);trayMenu.addSeparator();constquitAction=newQAction();quitAction.setText("Quit");quitAction.addEventListener('triggered',()=>process.exit());trayMenu.addAction(quitAction);consttray=newQSystemTrayIcon();consticon=newQIcon(resolve(__dirname,'../../ico/logo_white.bmp'));tray.setIcon(icon);tray.setToolTip("rblxRP");tray.setContextMenu(trayMenu)tray.show();setInterval(async()=>{console.log("waiting promise")awaitnewPromise((a)=>setTimeout(a,1));console.log("resolved!");},1000);global["tray"]=tray;// To prevent win from being garbage collected.
Activity
foxt commentedon Aug 9, 2021
Screen.Recording.2021-08-09.at.05.05.37.mov
a7ul commentedon Aug 9, 2021
Hi @theLMGN
can you try the dev build of qode here #862 (comment)
foxt commentedon Aug 9, 2021
Thanks @a7ul, can confirm that version fixes the issue!