(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{470:function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return m}));var a=n(0),r=n.n(a);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=r.a.createContext({}),d=function(e){var t=r.a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},p=function(e){var t=d(e.components);return r.a.createElement(c.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},b=r.a.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,o=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),p=d(n),b=a,m=p["".concat(o,".").concat(b)]||p[b]||u[b]||i;return n?r.a.createElement(m,s(s({ref:t},c),{},{components:n})):r.a.createElement(m,s({ref:t},c))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=b;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:a,o[1]=s;for(var c=2;c (.../nodegui/node_modules/node-fetch/lib/index.js:1461:11)\n at ClientRequest.emit (events.js:315:20)\n at TLSSocket.socketErrorListener (_http_client.js:426:9)\n at TLSSocket.emit (events.js:315:20)\n at emitErrorNT (internal/streams/destroy.js:92:8)\n at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)\n at processTicksAndRejections (internal/process/task_queues.js:84:21) {\n type: 'system',\n errno: 'ETIMEDOUT',\n code: 'ETIMEDOUT'\n}\n")),Object(i.b)("p",null,"In this scenario, you would need to find a mirror (alternate domain) for the binaries which can then be substituted using the ",Object(i.b)("inlineCode",{parentName:"p"},"QT_LINK_MIRROR")," environment variable. Let's assume we've found an active mirror, for example, ",Object(i.b)("inlineCode",{parentName:"p"},"https://qt-mirror.dannhauer.de"),", we can then follow these steps to configure the installation:"),Object(i.b)("h4",{id:"unix--macos"},Object(i.b)("strong",{parentName:"h4"},"Unix / MacOS")),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-sh"}),"QT_LINK_MIRROR=https://qt-mirror.dannhauer.de\n\nnpm install\n")),Object(i.b)("h4",{id:"windows"},Object(i.b)("strong",{parentName:"h4"},"Windows")),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-cmd"}),"set QT_LINK_MIRROR=https://qt-mirror.dannhauer.de\n\nnpm install\n")),Object(i.b)("p",null,"Now, instead of requesting the resource from"),Object(i.b)("p",null,Object(i.b)("inlineCode",{parentName:"p"},"https://download.qt.io/online/...")),Object(i.b)("p",null,"as in the example above, the script responsible for installing these components would use "),Object(i.b)("p",null,Object(i.b)("inlineCode",{parentName:"p"},"https://qt-mirror.dannhauer.de/online/...")),Object(i.b)("p",null,"If this does not solve your problem, please make sure you have installed all the necessary ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"/docs/guides/getting-started#developer-environment"}),"requirements")),Object(i.b)("h2",{id:"why-am-i-having-trouble-installing-qode"},"Why am I having trouble installing Qode?"),Object(i.b)("p",null,"When running ",Object(i.b)("inlineCode",{parentName:"p"},"npm install @nodegui/qode"),", some users occasionally encounter\ninstallation errors."),Object(i.b)("p",null,"In almost all cases, these errors are the result of network problems and not\nactual issues with the ",Object(i.b)("inlineCode",{parentName:"p"},"@nodegui/qode")," npm package. Errors like ",Object(i.b)("inlineCode",{parentName:"p"},"ELIFECYCLE"),",\n",Object(i.b)("inlineCode",{parentName:"p"},"EAI_AGAIN"),", ",Object(i.b)("inlineCode",{parentName:"p"},"ECONNRESET"),", and ",Object(i.b)("inlineCode",{parentName:"p"},"ETIMEDOUT")," are all indications of such\nnetwork problems. The best resolution is to try switching networks, or\nwait a bit and try installing again."),Object(i.b)("p",null,"You can also attempt to download Qode directly from\n",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/nodegui/qode/releases"}),"nodegui/qode/releases"),"\nif installing via ",Object(i.b)("inlineCode",{parentName:"p"},"npm")," is failing."),Object(i.b)("h2",{id:"javascript-widgets-are-missing-methods-and-properties-as-compared-to-qt-widget"},"Javascript widgets are missing methods and properties as compared to QT widget?"),Object(i.b)("p",null,"As you would have noticed, the list of methods and properties are less compared to what is present in the Qt's corresponding widget class. This is because we havent written wrappers for them yet. You can help add more methods by following the development guide for contributors. Overtime this gap would reduce."),Object(i.b)("h2",{id:"when-will-qode-upgrade-to-latest-nodejs--qt-version"},"When will Qode upgrade to latest Node.js / Qt version?"),Object(i.b)("p",null,"When a new version of Node.js/Qt gets released, we usually wait for about a month\nbefore upgrading the one in Qode. So we can avoid getting affected by bugs\nintroduced in new Node.js/Qt versions, which happens very often."),Object(i.b)("h2",{id:"my-apps-windowwidgetstray-disappeared-after-a-few-minutes"},"My app's window/widgets/tray disappeared after a few minutes."),Object(i.b)("p",null,"This happens when the variable which is used to store the window/tray gets\ngarbage collected."),Object(i.b)("p",null,"If you encounter this problem, the following articles may prove helpful:"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Memory_Management"}),"Memory Management")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://msdn.microsoft.com/library/bzt2dkta(v=vs.94).aspx"}),"Variable Scope"))),Object(i.b)("p",null,"If you want a quick fix, you can make the variables global by changing your\ncode from this:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-javascript"}),'const { QWidget } = require("@nodegui/nodegui");\n\nconst view = new QWidget();\nview.setObjectName("container");\nview.setLayout(new FlexLayout());\n')),Object(i.b)("p",null,"to this:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-javascript"}),'const { QWidget } = require("@nodegui/nodegui");\n\nconst view = new QWidget();\nview.setObjectName("container");\nview.setLayout(new FlexLayout());\n\nglobal.view = view; //prevent GC\n')))}d.isMDXComponent=!0}}]);