53 lines
53 KiB
HTML
53 lines
53 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en" data-theme="">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width">
|
|
<script type="text/javascript">/*<![CDATA[*/window.__chunkMapping={"main":["/main.f66713773e9ba37b90fe.css","/main.45a290f00dd7b6129c4a.js"],"component---site-src-pages-index-jsc-4-f-f99":["/component---site-src-pages-index-jsc-4-f-f99.71bf8f44fd9ac59b6a50.css","/component---site-src-pages-index-jsc-4-f-f99.438c47f7e14d781ed211.js"],"component---theme-blog-post-pageccc-cab":["/component---theme-blog-post-pageccc-cab.a03708177ba1c62de77f.js"],"content---blog-welcome-286-e55":["/content---blog-welcome-286-e55.1a36c0cf0942373a67a1.js"],"metadata---blog-welcome-27-a-91f":["/metadata---blog-welcome-27-a-91f.63baecf308a43e211599.js"],"component---theme-blog-list-pagea-6-a-7ba":["/component---theme-blog-list-pagea-6-a-7ba.3eec87adfad0d6553692.js"],"content---blogaf-1-856":["/content---blogaf-1-856.d9776ce013f7485dcbe5.js"],"metadata---blog-83-c-2b0":["/metadata---blog-83-c-2b0.b5c7fafcf69c0c7eb46c.js"],"component---theme-doc-legacy-page-9-e-7-ca5":["/component---theme-doc-legacy-page-9-e-7-ca5.3c38a2f40a51efdd72a0.css","/component---theme-doc-legacy-page-9-e-7-ca5.f5d90ad6613508f9bb4b.js"],"docsMetadata---docs-150-2d6":["/docsMetadata---docs-150-2d6.b715e347b791ba241d91.js"],"component---theme-doc-legacy-item-031-769":["/component---theme-doc-legacy-item-031-769.1f1ce10374de019f5d3a.css","/component---theme-doc-legacy-item-031-769.89c72f3cd114f0722210.js"],"content---docs-doc-1-b-2-f-e80":["/content---docs-doc-1-b-2-f-e80.ddd073b1341446b818e6.js"],"metadata---docs-doc-12-a-3-5a1":["/metadata---docs-doc-12-a-3-5a1.f25ce25e5861f75b58b8.js"],"content---docs-mdxce-3-7d1":["/content---docs-mdxce-3-7d1.f19d3e844bb6a68ee99a.js"],"metadata---docs-mdx-786-f56":["/metadata---docs-mdx-786-f56.d967dd45c3cc77deaa67.js"],"content---docs-development-common-errorsf-15-a5b":["/content---docs-development-common-errorsf-15-a5b.3c446456ebcde11f2e0c.js"],"metadata---docs-development-common-errors-402-ef4":["/metadata---docs-development-common-errors-402-ef4.2278b16151ee83b70d42.js"],"content---docs-development-readme-149-437":["/content---docs-development-readme-149-437.88d3682f8536e933a815.js"],"metadata---docs-development-readm-ec-6-c-332":["/metadata---docs-development-readm-ec-6-c-332.89a6ec882abd5a9d2dbf.js"],"content---docs-development-debuggingb-54-9ed":["/content---docs-development-debuggingb-54-9ed.d76308cc2f9733de248d.js"],"metadata---docs-development-debuggingc-36-26a":["/metadata---docs-development-debuggingc-36-26a.ece7f5fe52e59a94edc7.js"],"content---docs-development-getting-started-139-387":["/content---docs-development-getting-started-139-387.9789bece43bb79d98058.js"],"metadata---docs-development-getting-started-89-b-c7a":["/metadata---docs-development-getting-started-89-b-c7a.7cb9980eac431c87f351.js"],"content---docs-development-setting-up-28-c-666":["/content---docs-development-setting-up-28-c-666.93469fbea5d970326d62.js"],"metadata---docs-development-setting-up-979-75f":["/metadata---docs-development-setting-up-979-75f.2dc3a735cddac97a14cc.js"],"content---docs-development-signal-and-event-handling-7-d-4-f3f":["/content---docs-development-signal-and-event-handling-7-d-4-f3f.8f1478c9222a4363963f.js"],"metadata---docs-development-signal-and-event-handling-0-b-5-692":["/metadata---docs-development-signal-and-event-handling-0-b-5-692.96786c0bf5b413a0c737.js"],"content---docs-development-wrapping-widgets-84-b-538":["/content---docs-development-wrapping-widgets-84-b-538.d89aa40f77ccea2817e5.js"],"metadata---docs-development-wrapping-widgets-303-fb8":["/metadata---docs-development-wrapping-widgets-303-fb8.7de59ea4ff29a4f9f36c.js"],"content---docs-development-styling-293-cad":["/content---docs-development-styling-293-cad.7a035f4c17a4f8b41e6d.js"],"metadata---docs-development-styling-1-c-2-0d6":["/metadata---docs-development-styling-1-c-2-0d6.8829c5502955ccec4576.js"],"content---docs-api-component-4-ef-195":["/content---docs-api-component-4-ef-195.ac86aa3082e629a0fd98.js"],"metadata---docs-api-component-3-e-5-43d":["/metadata---docs-api-component-3-e-5-43d.9b39404632ecfdb50982.js"],"content---docs-api-event-widgetac-6-11b":["/content---docs-api-event-widgetac-6-11b.4726443f421e51b0d420.js"],"metadata---docs-api-event-widget-39-a-9ea":["/metadata---docs-api-event-widget-39-a-9ea.edfe85ee1fcdd7cb7101.js"],"content---docs-api-flex-layout-3-dc-a16":["/content---docs-api-flex-layout-3-dc-a16.d90deab60a0b03adb19c.js"],"metadata---docs-api-flex-layoutecf-540":["/metadata---docs-api-flex-layoutecf-540.2d3fb4d7157f407e6920.js"],"content---docs-api-node-layoutd-28-11a":["/content---docs-api-node-layoutd-28-11a.d4ccb56b0585944a2480.js"],"metadata---docs-api-node-layout-1-e-9-c15":["/metadata---docs-api-node-layout-1-e-9-c15.179e13a493418e058ba4.js"],"content---docs-api-node-widget-080-a39":["/content---docs-api-node-widget-080-a39.25d47992ba66ab6276fa.js"],"metadata---docs-api-node-widgeta-92-a4f":["/metadata---docs-api-node-widgeta-92-a4f.8b67d377500e70ea4010.js"],"content---docs-api-q-abstract-scroll-area-3-e-6-d7f":["/content---docs-api-q-abstract-scroll-area-3-e-6-d7f.0305fc3d93f3800bdaed.js"],"metadata---docs-api-q-abstract-scroll-area-59-d-279":["/metadata---docs-api-q-abstract-scroll-area-59-d-279.c6e451e9baaa50f1a767.js"],"content---docs-api-q-abstract-slider-3-e-0-54d":["/content---docs-api-q-abstract-slider-3-e-0-54d.5055c7d021c891329809.js"],"metadata---docs-api-q-abstract-sliderdfa-ab7":["/metadata---docs-api-q-abstract-sliderdfa-ab7.2677a7d07312372a5993.js"],"content---docs-api-q-action-051-425":["/content---docs-api-q-action-051-425.d5ed6c42bd38d21da022.js"],"metadata---docs-api-q-actioncfb-cfc":["/metadata---docs-api-q-actioncfb-cfc.b267247d529043310ceb.js"],"content---docs-api-q-applicationd-3-e-0a3":["/content---docs-api-q-applicationd-3-e-0a3.4a5638417241e717a1af.js"],"metadata---docs-api-q-applicationc-1-d-8a4":["/metadata---docs-api-q-applicationc-1-d-8a4.fb5866c48151d50147d1.js"],"content---docs-api-q-check-boxd-9-b-c95":["/content---docs-api-q-check-boxd-9-b-c95.2d8b202df2c885356f36.js"],"metadata---docs-api-q-check-box-132-293":["/metadata---docs-api-q-check-box-132-293.199b4e6d6672056d3417.js"],"content---docs-api-q-cursor-362-d51":["/content---docs-api-q-cursor-362-d51.5357365172999bdcb42d.js"],"metadata---docs-api-q-cursor-887-11e":["/metadata---docs-api-q-cursor-887-11e.b427afee36855a2632b0.js"],"content---docs-api-q-clipboard-69-d-2ef":["/content---docs-api-q-clipboard-69-d-2ef.b19eb25cc8bcf1dab699.js"],"metadata---docs-api-q-clipboard-486-b21":["/metadata---docs-api-q-clipboard-486-b21.5f56ac589aa9a7c572a1.js"],"content---docs-api-q-dial-80-b-99a":["/content---docs-api-q-dial-80-b-99a.497d08b4895fce74e76b.js"],"metadata---docs-api-q-dialbfb-aef":["/metadata---docs-api-q-dialbfb-aef.260884788441ea65353d.js"],"content---docs-api-q-grid-layouta-4-e-552":["/content---docs-api-q-grid-layouta-4-e-552.bed8dbf953a3a439399a.js"],"metadata---docs-api-q-grid-layout-7-db-030":["/metadata---docs-api-q-grid-layout-7-db-030.6aa2aebb347716f57295.js"],"content---docs-api-q-key-sequence-6-b-2-ebe":["/content---docs-api-q-key-sequence-6-b-2-ebe.05d8078aaa59d1e40317.js"],"metadata---docs-api-q-key-sequence-623-1a1":["/metadata---docs-api-q-key-sequence-623-1a1.00f0a8b2411d0e72f51a.js"],"content---docs-api-q-icone-5-f-b0d":["/content---docs-api-q-icone-5-f-b0d.12f06c2c88df7ed159ab.js"],"metadata---docs-api-q-icone-6-d-093":["/metadata---docs-api-q-icone-6-d-093.63a99b526361457b3af0.js"],"content---docs-api-q-line-editea-0-53d":["/content---docs-api-q-line-editea-0-53d.fefd53f666fefaddd62a.js"],"metadata---docs-api-q-line-edit-13-f-b8a":["/metadata---docs-api-q-line-edit-13-f-b8a.6ff72d32eab993d3ae53.js"],"content---docs-api-q-label-2-f-9-04b":["/content---docs-api-q-label-2-f-9-04b.156b30b2d519a705617f.js"],"metadata---docs-api-q-label-165-210":["/metadata---docs-api-q-label-165-210.758b05cd2c660c078d9b.js"],"content---docs-api-q-main-window-0-e-7-299":["/content---docs-api-q-main-window-0-e-7-299.c83910546de4969d7d9c.js"],"metadata---docs-api-q-main-window-04-f-efb":["/metadata---docs-api-q-main-window-04-f-efb.8341a5685043621ff13f.js"],"content---docs-api-q-menu-39-e-ecd":["/content---docs-api-q-menu-39-e-ecd.435aecfafccc1735d8fd.js"],"metadata---docs-api-q-menuc-6-b-9ab":["/metadata---docs-api-q-menuc-6-b-9ab.ef602faff0797956b886.js"],"content---docs-api-q-pixmap-8-dd-cb2":["/content---docs-api-q-pixmap-8-dd-cb2.81c976491861ed2e8230.js"],"metadata---docs-api-q-pixmapfdf-820":["/metadata---docs-api-q-pixmapfdf-820.12b3ffaf671737fe2f3f.js"],"content---docs-api-q-menu-bar-8-d-2-872":["/content---docs-api-q-menu-bar-8-d-2-872.fdf8987a4bf88fc8901e.js"],"metadata---docs-api-q-menu-bare-25-882":["/metadata---docs-api-q-menu-bare-25-882.1fa4c845b8584b483b86.js"],"content---docs-api-q-progress-barc-46-afe":["/content---docs-api-q-progress-barc-46-afe.0e108b0c330733599ee7.js"],"metadata---docs-api-q-progress-bar-43-d-07e":["/metadata---docs-api-q-progress-bar-43-d-07e.53ae938c25aee0ba40b3.js"],"content---docs-api-q-plain-text-edit-7-c-8-081":["/content---docs-api-q-plain-text-edit-7-c-8-081.69958a248c8e3bed8775.js"],"metadata---docs-api-q-plain-text-edit-161-ecc":["/metadata---docs-api-q-plain-text-edit-161-ecc.f1f3a265662086be9410.js"],"content---docs-api-q-radio-buttone-54-746":["/content---docs-api-q-radio-buttone-54-746.87f7fd608df14fb649f2.js"],"metadata---docs-api-q-radio-button-367-f7c":["/metadata---docs-api-q-radio-button-367-f7c.25ed1035622c583fcb5b.js"],"content---docs-api-q-scroll-area-8-c-4-3fd":["/content---docs-api-q-scroll-area-8-c-4-3fd.a95e8778b43de8e58cc6.js"],"metadata---docs-api-q-scroll-area-46-a-96e":["/metadata---docs-api-q-scroll-area-46-a-96e.2ffdfa06e78377f0f244.js"],"content---docs-api-q-push-button-06-c-73e":["/content---docs-api-q-push-button-06-c-73e.7c6d190833e714e5c375.js"],"metadata---docs-api-q-push-button-96-d-c92":["/metadata---docs-api-q-push-button-96-d-c92.e547f62186acf8f90f86.js"],"content---docs-api-q-spin-box-1-ce-bfd":["/content---docs-api-q-spin-box-1-ce-bfd.3bd8fa45db21e2cf62aa.js"],"metadata---docs-api-q-spin-box-809-ae0":["/metadata---docs-api-q-spin-box-809-ae0.7f51dd605c46a504573d.js"],"content---docs-api-q-shortcut-271-2d3":["/content---docs-api-q-shortcut-271-2d3.c71f5f293b8073286769.js"],"metadata---docs-api-q-shortcut-5-e-7-1aa":["/metadata---docs-api-q-shortcut-5-e-7-1aa.630d67dc0d670079b22a.js"],"content---docs-api-q-tab-widget-508-95e":["/content---docs-api-q-tab-widget-508-95e.b3e17e202cf0bc3d41a0.js"],"metadata---docs-api-q-tab-widgetebc-5aa":["/metadata---docs-api-q-tab-widgetebc-5aa.e0a6589390b7f44ec063.js"],"content---docs-api-q-widget-04-a-59f":["/content---docs-api-q-widget-04-a-59f.b622c9de949ee036de5d.js"],"metadata---docs-api-q-widget-287-e6c":["/metadata---docs-api-q-widget-287-e6c.5cbf78a727e1cde95092.js"],"content---docs-api-qt-enumsfd-7-cf3":["/content---docs-api-qt-enumsfd-7-cf3.e59bb09aec85c34ab538.js"],"metadata---docs-api-qt-enums-423-cf9":["/metadata---docs-api-qt-enums-423-cf9.f684726aaa69a1c668e0.js"],"content---docs-api-process-5-ec-b1e":["/content---docs-api-process-5-ec-b1e.40a8fbaedcb21a397a82.js"],"metadata---docs-api-process-32-d-09e":["/metadata---docs-api-process-32-d-09e.312380014e3004f0b59d.js"],"content---docs-api-yoga-widgeta-42-cc7":["/content---docs-api-yoga-widgeta-42-cc7.7f6ddb70d14b143a706e.js"],"metadata---docs-api-yoga-widget-95-c-f8b":["/metadata---docs-api-yoga-widget-95-c-f8b.0952301915fda512ad58.js"],"content---docs-api-synopsis-7-bb-e1c":["/content---docs-api-synopsis-7-bb-e1c.460fa3db3d8bc59f8c4d.js"],"metadata---docs-api-synopsis-21-f-a62":["/metadata---docs-api-synopsis-21-f-a62.b9b08a2ca1ca62f47e76.js"],"content---docs-guides-custom-nodegui-native-plugin-632-9db":["/content---docs-guides-custom-nodegui-native-plugin-632-9db.182360b1746adca01da3.js"],"metadata---docs-guides-custom-nodegui-native-plugin-92-b-12f":["/metadata---docs-guides-custom-nodegui-native-plugin-92-b-12f.aac2783a2a02286d8c2e.js"],"content---docs-guides-debuggingf-3-f-cf5":["/content---docs-guides-debuggingf-3-f-cf5.4682bd1ac4f23d3e86f5.js"],"metadata---docs-guides-debugging-970-fb8":["/metadata---docs-guides-debugging-970-fb8.7ca54570c91966e72225.js"],"content---docs-guides-getting-startedc-9-e-20f":["/content---docs-guides-getting-startedc-9-e-20f.bae98e11a4d1afd5ece3.js"],"metadata---docs-guides-getting-started-2-b-7-1a4":["/metadata---docs-guides-getting-started-2-b-7-1a4.cf915e85af2bcf9dcb4d.js"],"content---docs-guides-debugging-in-vscodebd-7-cec":["/content---docs-guides-debugging-in-vscodebd-7-cec.216a1ec2b1810da330e8.js"],"metadata---docs-guides-debugging-in-vscodebf-8-5b0":["/metadata---docs-guides-debugging-in-vscodebf-8-5b0.391f49f7fdbdeb652131.js"],"content---docs-guides-handle-events-160-4b0":["/content---docs-guides-handle-events-160-4b0.01ecbd8c9929aace6bcf.js"],"metadata---docs-guides-handle-events-5-eb-540":["/metadata---docs-guides-handle-events-5-eb-540.729dc678c6c75a2be509.js"],"content---docs-guides-layoutdf-5-a64":["/content---docs-guides-layoutdf-5-a64.c92b4110b3283e066c7a.js"],"metadata---docs-guides-layoutf-65-d7d":["/metadata---docs-guides-layoutf-65-d7d.5235ece360fd2df07457.js"],"content---docs-guides-images-991-065":["/content---docs-guides-images-991-065.057a79a25b47fd24b4c0.js"],"metadata---docs-guides-images-915-5ee":["/metadata---docs-guides-images-915-5ee.f07eeb7211cb106750b6.js"],"content---docs-guides-nodegui-architecture-262-19e":["/content---docs-guides-nodegui-architecture-262-19e.b272d2df66c6f8da8e15.js"],"metadata---docs-guides-nodegui-architecture-550-b82":["/metadata---docs-guides-nodegui-architecture-550-b82.6ef8a4240e82dda88ef6.js"],"content---docs-guides-networking-374-03e":["/content---docs-guides-networking-374-03e.9903a8da0238bf5c2967.js"],"metadata---docs-guides-networkingdfd-ce0":["/metadata---docs-guides-networkingdfd-ce0.f468fa27fcddc10bda17.js"],"content---docs-guides-stylingfec-977":["/content---docs-guides-stylingfec-977.faeed6a3911228cdc7c9.js"],"metadata---docs-guides-styling-9-ea-213":["/metadata---docs-guides-styling-9-ea-213.027923e83e870425fa87.js"],"content---docs-guides-scroll-view-76-e-87c":["/content---docs-guides-scroll-view-76-e-87c.a5a69418795a102af9b0.js"],"metadata---docs-guides-scroll-view-9-a-9-2ac":["/metadata---docs-guides-scroll-view-9-a-9-2ac.b159b418970e82287a4b.js"],"content---docs-api-q-system-tray-icon-4-b-8-4c7":["/content---docs-api-q-system-tray-icon-4-b-8-4c7.2889cd55fe7196ceeae3.js"],"metadata---docs-api-q-system-tray-icon-711-f90":["/metadata---docs-api-q-system-tray-icon-711-f90.c8c7602ffde423be8412.js"],"content---docs-guides-tutoriale-53-6ab":["/content---docs-guides-tutoriale-53-6ab.b4702b3c02ea5df46453.js"],"metadata---docs-guides-tutorial-1-f-1-23b":["/metadata---docs-guides-tutorial-1-f-1-23b.81a7a090a6ceb13dc5b6.js"],"content---docs-guides-using-native-node-modules-3-ab-104":["/content---docs-guides-using-native-node-modules-3-ab-104.1efbefcc3ddc283d0c81.js"],"metadata---docs-guides-using-native-node-modules-31-f-551":["/metadata---docs-guides-using-native-node-modules-31-f-551.ec0eb319d94123d20db5.js"],"content---docs-faq-048-db5":["/content---docs-faq-048-db5.fe63c40d48528e84d8a3.js"],"metadata---docs-faq-59-d-2b9":["/metadata---docs-faq-59-d-2b9.346e6e58c65ab3695de9.js"],"component---theme-blog-tags-posts-page-687-b6c":["/component---theme-blog-tags-posts-page-687-b6c.ef5908bc39eb09e95ce4.js"],"metadata---blog-tags-nodegui-632-d46":["/metadata---blog-tags-nodegui-632-d46.900f615f420a5e1fa2ba.js"],"metadata---blog-tags-hellob-02-3e8":["/metadata---blog-tags-hellob-02-3e8.94799fd06d2ac9e5f2fc.js"],"component---theme-blog-tags-list-page-01-a-d0b":["/component---theme-blog-tags-list-page-01-a-d0b.3c076102240034124342.js"],"tags---blog-tags-8-d-7-36d":["/tags---blog-tags-8-d-7-36d.b0b8e5864a4a247d36f9.js"]};/*]]>*/</script>
|
|
|
|
<title data-react-helmet="true">NodeWidget</title>
|
|
|
|
<meta data-react-helmet="true" charset="utf-8"/><meta data-react-helmet="true" http-equiv="x-ua-compatible" content="ie=edge"/><meta data-react-helmet="true" name="viewport" content="width=device-width"/><meta data-react-helmet="true" property="og:title" content="NodeWidget"/><meta data-react-helmet="true" name="description" content="> Abstract class to add functionalities common to all Widgets."/><meta data-react-helmet="true" property="og:description" content="> Abstract class to add functionalities common to all Widgets."/><meta data-react-helmet="true" property="og:url" content="https://nodegui.org/docs/api/NodeWidget"/><meta data-react-helmet="true" name="twitter:card" content="summary"/>
|
|
|
|
<link data-react-helmet="true" rel="shortcut icon" href="/img/favicon.ico"/>
|
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="/main.f66713773e9ba37b90fe.css" />
|
|
|
|
<link rel="stylesheet" type="text/css" href="/1.196ce05925ea6d776920.css" />
|
|
|
|
<link rel="stylesheet" type="text/css" href="/2.702de9bbb01fe4f46fa1.css" />
|
|
|
|
<link rel="stylesheet" type="text/css" href="/component---theme-doc-legacy-page-9-e-7-ca5.3c38a2f40a51efdd72a0.css" />
|
|
|
|
<link rel="stylesheet" type="text/css" href="/component---theme-doc-legacy-item-031-769.1f1ce10374de019f5d3a.css" />
|
|
|
|
</head>
|
|
<body >
|
|
<div id="__docusaurus">
|
|
<nav class="navbar navbar--light navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><div aria-label="Navigation bar toggle" class="navbar__toggle" role="button" tabindex="0"><svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 30 30" role="img" focusable="false"><title>Menu</title><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></div><a aria-current="page" class="navbar__brand active" href="/"><img class="navbar__logo" src="/img/logo-circle.png" alt="NodeGui Logo"/><strong>NodeGui</strong></a></div><div class="navbar__items navbar__items--right"><a class="navbar__item navbar__link" label="Docs" position="right" href="/docs/guides/getting-started">Docs</a><a class="navbar__item navbar__link" label="API" position="right" href="/docs/api/QApplication">API</a><a class="navbar__item navbar__link" label="Blog" position="right" href="/blog">Blog</a><a class="navbar__item navbar__link" href="https://github.com/nodegui/nodegui" label="GitHub" position="right" target="_blank" rel="noopener noreferrer">GitHub</a><div class="react-toggle displayOnlyInLargeViewport_1gtM"><div class="react-toggle-track"><div class="react-toggle-track-check"><span class="toggle_16vC moon_1N64"></span></div><div class="react-toggle-track-x"><span class="toggle_16vC sun_3CZP"></span></div></div><div class="react-toggle-thumb"></div><input type="checkbox" aria-label="Dark mode toggle" class="react-toggle-screenreader-only"/></div></div></div><div role="presentation" class="navbar__sidebar__backdrop"></div><div class="navbar__sidebar"><div class="navbar__sidebar__brand"><a aria-current="page" class="navbar__brand active" href="/"><img class="navbar__logo" src="/img/logo-circle.png" alt="NodeGui Logo"/><strong>NodeGui</strong></a></div><div class="navbar__sidebar__items"><div class="menu"><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" label="Docs" position="right" href="/docs/guides/getting-started">Docs</a></li><li class="menu__list-item"><a class="menu__link" label="API" position="right" href="/docs/api/QApplication">API</a></li><li class="menu__list-item"><a class="menu__link" label="Blog" position="right" href="/blog">Blog</a></li><li class="menu__list-item"><a class="menu__link" href="https://github.com/nodegui/nodegui" label="GitHub" position="right" target="_blank" rel="noopener noreferrer">GitHub</a></li></ul></div></div></div></nav><div class="container container--fluid"><div class="row"><div class="col col--3"><div class="sidebar_Qb2S"><div class="menu menu--responsive"><button aria-label="Open Menu" class="button button--secondary button--sm menu__button" type="button"><svg class="sidebarMenuIcon_1uhT" xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 32 32" role="img" focusable="false"><title>Menu</title><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" href="#!">General</a><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" href="/docs/api/synopsis">Synopsis</a></li></ul></li><li class="menu__list-item"><a class="menu__link" href="#!">Widgets</a><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" href="/docs/api/QApplication">QApplication</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/api/QCheckBox">QCheckBox</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/api/QDial">QDial</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/api/QLabel">QLabel</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/api/QLineEdit">QLineEdit</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/api/QMainWindow">QMainWindow</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/api/QPlainTextEdit">QPlainTextEdit</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/api/QProgressBar">QProgressBar</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/api/QPushButton">QPushButton</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/api/QRadioButton">QRadioButton</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/api/QScrollArea">QScrollArea</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/api/QSpinBox">QSpinBox</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/api/QTabWidget">QTabWidget</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/api/QWidget">QWidget</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/api/QMenu">QMenu</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/api/QMenuBar">QMenuBar</a></li></ul></li><li class="menu__list-item"><a class="menu__link" href="#!">Layouts</a><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" href="/docs/api/FlexLayout">FlexLayout</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/api/QGridLayout">QGridLayout</a></li></ul></li><li class="menu__list-item"><a class="menu__link" href="#!">Modules</a><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" href="/docs/api/QClipboard">QClipboard</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/api/QCursor">QCursor</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/api/QPixmap">QPixmap</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/api/QtEnums">Qt Enums</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/api/QShortcut">QShortcut</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/api/QAction">QAction</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/api/QKeySequence">QKeySequence</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/api/QIcon">QIcon</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/api/QSystemTrayIcon">QSystemTrayIcon</a></li></ul></li><li class="menu__list-item"><a class="menu__link" href="#!">Internal Modules</a><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" href="/docs/api/Component">Component</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/api/EventWidget">EventWidget</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/api/NodeLayout">NodeLayout</a></li><li class="menu__list-item"><a aria-current="page" class="menu__link menu__link--active" href="/docs/api/NodeWidget">NodeWidget</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/api/YogaWidget">YogaWidget</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/api/QAbstractScrollArea">QAbstractScrollArea</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/api/QAbstractSlider">QAbstractSlider</a></li></ul></li><li class="menu__list-item"><a class="menu__link" href="#!">APIs</a><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" href="/docs/api/process">process</a></li></ul></li></ul></div></div></div><main class="col"><div><div class="padding-vert--lg"><div class="row"><div class="col"><div class="docItemContainer_3Gws"><header><h1 class="margin-bottom--lg">NodeWidget</h1></header><article><div class="markdown"><blockquote><p>Abstract class to add functionalities common to all Widgets.</p></blockquote><p><strong>This class implements all methods, properties of Qt's <a href="https://doc.qt.io/qt-5/qwidget.html">QWidget class</a> so that it can be inherited by all widgets</strong></p><p><code>NodeWidget</code> is an abstract class and hence no instances of the same should be created. It exists so that we can add similar functionalities to all widget's easily. Additionally it helps in type checking process. If you wish to create a <code>div</code> like widget use <a href="/docs/api/QWidget">QWidget</a> instead.</p><p><strong>NodeWidget is the base class for all widgets. It inherits from another abstract class <a href="/docs/api/EventWidget">EventWidget</a></strong></p><h3><a aria-hidden="true" class="anchor" id="example"></a><a aria-hidden="true" class="hash-link" href="#example">#</a>Example</h3><pre class="mdxCodeBlock_iHAB"><div class="codeBlockWrapper_2QGZ"><pre class="prism-code language-javascript codeBlock_19pQ" style="color:#d6deeb;background-color:#011627"><div class="token-line" style="color:#d6deeb"><span class="token keyword" style="color:rgb(127, 219, 202)">const</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span></div><div class="token-line" style="color:#d6deeb"><span class="token plain"> </span><span class="token maybe-class-name">NodeWidget</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span></div><div class="token-line" style="color:#d6deeb"><span class="token plain"> </span><span class="token maybe-class-name">QPushButton</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span></div><div class="token-line" style="color:#d6deeb"><span class="token plain"> </span><span class="token maybe-class-name">QWidget</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span></div><div class="token-line" style="color:#d6deeb"><span class="token plain"> </span><span class="token maybe-class-name">QRadioButton</span><span class="token plain"></span></div><div class="token-line" style="color:#d6deeb"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"> </span><span class="token operator" style="color:rgb(127, 219, 202)">=</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">require</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(173, 219, 103)">"@nodegui/nodegui"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span></div><div class="token-line" style="color:#d6deeb"><span class="token plain" style="display:inline-block"></span></div><div class="token-line" style="color:#d6deeb"><span class="token plain"></span><span class="token comment" style="color:rgb(99, 119, 119);font-style:italic">// showWidget can accept any widget since it expects NodeWidget</span><span class="token plain"></span></div><div class="token-line" style="color:#d6deeb"><span class="token plain"></span><span class="token keyword" style="color:rgb(127, 219, 202)">const</span><span class="token plain"> </span><span class="token function-variable function" style="color:rgb(130, 170, 255)">showWidget</span><span class="token plain"> </span><span class="token operator" style="color:rgb(127, 219, 202)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token parameter">widget</span><span class="token parameter punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token parameter"> NodeWidget</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token arrow operator" style="color:rgb(127, 219, 202)">=></span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span></div><div class="token-line" style="color:#d6deeb"><span class="token plain"> widget</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token method function property-access" style="color:rgb(130, 170, 255)">show</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span></div><div class="token-line" style="color:#d6deeb"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span></div><div class="token-line" style="color:#d6deeb"><span class="token plain" style="display:inline-block"></span></div><div class="token-line" style="color:#d6deeb"><span class="token plain"></span><span class="token function" style="color:rgb(130, 170, 255)">showWidget</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token keyword" style="color:rgb(127, 219, 202)">new</span><span class="token plain"> </span><span class="token class-name" style="color:rgb(255, 203, 139)">QPushButton</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span></div><div class="token-line" style="color:#d6deeb"><span class="token plain"></span><span class="token function" style="color:rgb(130, 170, 255)">showWidget</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token keyword" style="color:rgb(127, 219, 202)">new</span><span class="token plain"> </span><span class="token class-name" style="color:rgb(255, 203, 139)">QWidget</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span></div><div class="token-line" style="color:#d6deeb"><span class="token plain"></span><span class="token function" style="color:rgb(130, 170, 255)">showWidget</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token keyword" style="color:rgb(127, 219, 202)">new</span><span class="token plain"> </span><span class="token class-name" style="color:rgb(255, 203, 139)">QRadioButton</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span></div></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_1BYj">Copy</button></div></pre><p>NodeWidget will list all methods and properties that are common to all widgets in the NodeGui world.</p><h2><a aria-hidden="true" class="anchor" id="static-methods"></a><a aria-hidden="true" class="hash-link" href="#static-methods">#</a>Static Methods</h2><p>NodeWidget can access all the static methods defined in <a href="/docs/api/EventWidget">EventWidget</a></p><h2><a aria-hidden="true" class="anchor" id="instance-properties"></a><a aria-hidden="true" class="hash-link" href="#instance-properties">#</a>Instance Properties</h2><p>NodeWidget can access all the instance properties defined in <a href="/docs/api/EventWidget">EventWidget</a></p><p>Additionally it also has the following instance properties:</p><h3><a aria-hidden="true" class="anchor" id="widgetlayout"></a><a aria-hidden="true" class="hash-link" href="#widgetlayout">#</a><code>widget.layout</code></h3><p>A <code>NodeLayout</code> representing current layout that is set on the widget.</p><h3><a aria-hidden="true" class="anchor" id="widgettype"></a><a aria-hidden="true" class="hash-link" href="#widgettype">#</a><code>widget.type</code></h3><p>This will return the string <code>widget</code> for all widgets.</p><h2><a aria-hidden="true" class="anchor" id="instance-methods"></a><a aria-hidden="true" class="hash-link" href="#instance-methods">#</a>Instance Methods</h2><p>NodeWidget can access all the instance methods defined in <a href="/docs/api/EventWidget">EventWidget</a></p><p>Additionally it also has the following instance methods:</p><h3><a aria-hidden="true" class="anchor" id="widgetshow"></a><a aria-hidden="true" class="hash-link" href="#widgetshow">#</a><code>widget.show()</code></h3><p>Shows the widget and its children. It calls the native method <a href="https://doc.qt.io/qt-5/qwidget.html#show">QWidget: show</a>.</p><h3><a aria-hidden="true" class="anchor" id="widgetresizewidth-height"></a><a aria-hidden="true" class="hash-link" href="#widgetresizewidth-height">#</a><code>widget.resize(width, height)</code></h3><p>Resizes the widget. It calls the native method <a href="https://doc.qt.io/qt-5/qwidget.html#resize-1">QWidget: resize</a>.</p><ul><li><code>width</code> number - Pixels.</li><li><code>height</code> number - Pixels.</li></ul><h3><a aria-hidden="true" class="anchor" id="widgetclose"></a><a aria-hidden="true" class="hash-link" href="#widgetclose">#</a><code>widget.close()</code></h3><p>Closes this widget. It calls the native method <a href="https://doc.qt.io/qt-5/qwidget.html#close">QWidget: close</a>.
|
|
Returns true if the widget was closed; otherwise returns false.</p><h3><a aria-hidden="true" class="anchor" id="widgetsetlayoutlayout"></a><a aria-hidden="true" class="hash-link" href="#widgetsetlayoutlayout">#</a><code>widget.setLayout(layout)</code></h3><p>Sets the layout manager for this widget to layout. It calls the native method <a href="https://doc.qt.io/qt-5/qwidget.html#setLayout">QWidget: setLayout</a>.</p><ul><li><code>layout</code> NodeLayout - Any layout that inherits from NodeLayout class.</li></ul><h3><a aria-hidden="true" class="anchor" id="widgetsetstylesheetstylesheet"></a><a aria-hidden="true" class="hash-link" href="#widgetsetstylesheetstylesheet">#</a><code>widget.setStyleSheet(styleSheet)</code></h3><p>Sets the property that holds the widget's style sheet. It calls the native method <a href="https://doc.qt.io/qt-5/qwidget.html#styleSheet-prop">QWidget: styleSheet</a>.</p><ul><li><code>styleSheet</code> string - String which holds the widget's style sheet. Make sure you create this string using <code>StyleSheet.create()</code></li></ul><h3><a aria-hidden="true" class="anchor" id="widgetsetcursorcursor"></a><a aria-hidden="true" class="hash-link" href="#widgetsetcursorcursor">#</a><code>widget.setCursor(cursor)</code></h3><p>Sets the window mouse cursor. It calls the native method <a href="https://doc.qt.io/qt-5/qwidget.html#cursor-prop">QWidget: setCursor</a>.</p><ul><li><code>cursor</code> CursorShape - Specifies current cursor for the window <a href="/docs/api/QtEnums">CursorShape is an enum from Qt</a></li></ul><h3><a aria-hidden="true" class="anchor" id="widgetsetwindowiconicon"></a><a aria-hidden="true" class="hash-link" href="#widgetsetwindowiconicon">#</a><code>widget.setWindowIcon(icon)</code></h3><p>Sets the window icon. It calls the native method <a href="https://doc.qt.io/qt-5/qwidget.html#windowIcon-prop">QWidget: setWindowIcon</a>.</p><ul><li><code>icon</code> QIcon - Specifies icon for the window.</li></ul><h3><a aria-hidden="true" class="anchor" id="widgetsetwindowstatestate"></a><a aria-hidden="true" class="hash-link" href="#widgetsetwindowstatestate">#</a><code>widget.setWindowState(state)</code></h3><p>Sets the window state. It calls the native method <a href="https://doc.qt.io/qt-5/qwidget.html#setWindowState">QWidget: setWindowState</a>.</p><ul><li><code>state</code> WindowState - Specifies current state for the window <a href="/docs/api/QtEnums">WindowState is an enum from Qt</a></li></ul><h3><a aria-hidden="true" class="anchor" id="widgetsetwindowtitletitle"></a><a aria-hidden="true" class="hash-link" href="#widgetsetwindowtitletitle">#</a><code>widget.setWindowTitle(title)</code></h3><p>Sets the window title property. It calls the native method <a href="https://doc.qt.io/qt-5/qwidget.html#windowTitle-prop">QWidget: setWindowTitle</a>.</p><ul><li><code>title</code> string - String which holds the windows title.</li></ul><h3><a aria-hidden="true" class="anchor" id="widgetstylesheet"></a><a aria-hidden="true" class="hash-link" href="#widgetstylesheet">#</a><code>widget.styleSheet()</code></h3><p>Gets the property that holds the widget's style sheet. It calls the native method <a href="https://doc.qt.io/qt-5/qwidget.html#styleSheet-prop">QWidget: styleSheet</a>.</p><h3><a aria-hidden="true" class="anchor" id="widgethide"></a><a aria-hidden="true" class="hash-link" href="#widgethide">#</a><code>widget.hide()</code></h3><p>Hides the widget and its children. It calls the native method <a href="https://doc.qt.io/qt-5/qwidget.html#hide">QWidget: hide</a>.</p><h3><a aria-hidden="true" class="anchor" id="widgetmovex-y"></a><a aria-hidden="true" class="hash-link" href="#widgetmovex-y">#</a><code>widget.move(x, y)</code></h3><p>Sets the screen position of the widget. It calls the native method <a href="https://doc.qt.io/qt-5/qwidget.html#move-1">QWidget: move</a>.</p><ul><li><code>x</code> number - Pixels.</li><li><code>y</code> number - Pixels.</li></ul><h3><a aria-hidden="true" class="anchor" id="widgetsetobjectnameobjectname"></a><a aria-hidden="true" class="hash-link" href="#widgetsetobjectnameobjectname">#</a><code>widget.setObjectName(objectName)</code></h3><p>Sets the object name of the widget in Qt. It calls the native method <a href="https://doc.qt.io/qt-5/qobject.html#objectName-prop">QObject: setObjectName</a>. Object name can be analogous to <code>id</code> of an element in the web world. Using the objectName of the widget one can reference it in the Qt's stylesheet much like what we do with id in the web world.</p><ul><li><code>objectName</code> string - String which holds the widget's object name.</li></ul><h3><a aria-hidden="true" class="anchor" id="widgetobjectname"></a><a aria-hidden="true" class="hash-link" href="#widgetobjectname">#</a><code>widget.objectName()</code></h3><p>Gets the property that holds the widget's object name. It calls the native method <a href="https://doc.qt.io/qt-5/qobject.html#objectName-prop">QObject: setObjectName</a>.</p><h3><a aria-hidden="true" class="anchor" id="widgetsetmousetrackingismousetracked"></a><a aria-hidden="true" class="hash-link" href="#widgetsetmousetrackingismousetracked">#</a><code>widget.setMouseTracking(isMouseTracked)</code></h3><p>Sets the property that tells whether mouseTracking is enabled for the widget. It calls the native method <a href="https://doc.qt.io/qt-5/qwidget.html#mouseTracking-prop">QWidget: mouseTracking</a>.</p><ul><li><code>isMouseTracked</code> boolean - Set it to true to enable mouse tracking.</li></ul><h3><a aria-hidden="true" class="anchor" id="widgetsetenabledenabled"></a><a aria-hidden="true" class="hash-link" href="#widgetsetenabledenabled">#</a><code>widget.setEnabled(enabled)</code></h3><p>Sets the property that tells whether the widget is enabled. It calls the native method <a href="https://doc.qt.io/qt-5/qwidget.html#enabled-prop">QWidget: enabled</a>. In general an enabled widget handles keyboard and mouse events; a disabled widget does not.</p><ul><li><code>enabled</code> boolean - Set it to true to enable the widget.</li></ul><h3><a aria-hidden="true" class="anchor" id="widgetsetfixedsizewidth-height"></a><a aria-hidden="true" class="hash-link" href="#widgetsetfixedsizewidth-height">#</a><code>widget.setFixedSize(width, height)</code></h3><p>Sets both the minimum and maximum sizes of the widget. It calls the native method <a href="https://doc.qt.io/qt-5/qwidget.html#setFixedSize">QWidget: setFixedSize</a>.</p><ul><li><code>width</code> number - Pixels.</li><li><code>height</code> number - Pixels.</li></ul><h3><a aria-hidden="true" class="anchor" id="widgetsetgeometryx-y-width-height"></a><a aria-hidden="true" class="hash-link" href="#widgetsetgeometryx-y-width-height">#</a><code>widget.setGeometry(x, y, width, height)</code></h3><p>Sets the screen position as well as size of the widget. It calls the native method <a href="https://doc.qt.io/qt-5/qwidget.html#setGeometry-1">QWidget: setGeometry</a>.</p><ul><li><code>x</code> number - Pixels.</li><li><code>y</code> number - Pixels.</li><li><code>width</code> number - Pixels.</li><li><code>height</code> number - Pixels.</li></ul><h3><a aria-hidden="true" class="anchor" id="widgetsetmaximumsizewidth-height"></a><a aria-hidden="true" class="hash-link" href="#widgetsetmaximumsizewidth-height">#</a><code>widget.setMaximumSize(width, height)</code></h3><p>Sets the maximum size of the widget. It calls the native method <a href="https://doc.qt.io/qt-5/qwidget.html#setMaximumSize-1">QWidget: setMaximumSize</a>.</p><ul><li><code>width</code> number - Pixels.</li><li><code>height</code> number - Pixels.</li></ul><h3><a aria-hidden="true" class="anchor" id="widgetsetminimumsizewidth-height"></a><a aria-hidden="true" class="hash-link" href="#widgetsetminimumsizewidth-height">#</a><code>widget.setMinimumSize(width, height)</code></h3><p>Sets the minimum size of the widget. It calls the native method <a href="https://doc.qt.io/qt-5/qwidget.html#setMinimumSize-1">QWidget: setMinimumSize</a>.</p><ul><li><code>width</code> number - Pixels.</li><li><code>height</code> number - Pixels.</li></ul><h3><a aria-hidden="true" class="anchor" id="widgetrepaint"></a><a aria-hidden="true" class="hash-link" href="#widgetrepaint">#</a><code>widget.repaint()</code></h3><p>Repaints the widget. It calls the native method <a href="https://doc.qt.io/qt-5/qwidget.html#repaint">QWidget: repaint</a>.</p><h3><a aria-hidden="true" class="anchor" id="widgetupdate"></a><a aria-hidden="true" class="hash-link" href="#widgetupdate">#</a><code>widget.update()</code></h3><p>Updates the widget. It calls the native method <a href="https://doc.qt.io/qt-5/qwidget.html#update">QWidget: update</a>.</p><h3><a aria-hidden="true" class="anchor" id="widgetpos"></a><a aria-hidden="true" class="hash-link" href="#widgetpos">#</a><code>widget.pos()</code></h3><p>Returns the current widget position. It calls the native method <a href="https://doc.qt.io/qt-5/qwidget.html#pos-prop">QWidget: pos</a>. The returned size object contains x and y coordinates in pixels.</p><h3><a aria-hidden="true" class="anchor" id="widgetsize"></a><a aria-hidden="true" class="hash-link" href="#widgetsize">#</a><code>widget.size()</code></h3><p>Returns the current widget size. It calls the native method <a href="https://doc.qt.io/qt-5/qwidget.html#size-prop">QWidget: size</a>. The returned size object contains width and height in pixels.</p><h3><a aria-hidden="true" class="anchor" id="widgetupdategeometry"></a><a aria-hidden="true" class="hash-link" href="#widgetupdategeometry">#</a><code>widget.updateGeometry()</code></h3><p>Notifies the layout system that this widget has changed and may need to change geometry.</p><h3><a aria-hidden="true" class="anchor" id="widgetsetattributeattributename-switchon"></a><a aria-hidden="true" class="hash-link" href="#widgetsetattributeattributename-switchon">#</a><code>widget.setAttribute(attributeName, switchOn)</code></h3><p>Sets the attribute attribute on this widget if on is true; otherwise clears the attribute. It calls the native method <a href="https://doc.qt.io/qt-5/qwidget.html#setAttribute">QWidget: setAttribute</a>.</p><ul><li><code>attributeName</code> WidgetAttribute - Enum from WidgetAttribute.</li><li><code>switchOn</code> boolean - set it to true if you want to enable an attribute.</li></ul><h3><a aria-hidden="true" class="anchor" id="widgettestattributeattributename"></a><a aria-hidden="true" class="hash-link" href="#widgettestattributeattributename">#</a><code>widget.testAttribute(attributeName)</code></h3><p>Returns true if attribute attribute is set on this widget; otherwise returns false. It calls the native method <a href="https://doc.qt.io/qt-5/qwidget.html#testAttribute">QWidget: testAttribute</a>.</p><ul><li><code>attributeName</code> WidgetAttribute - Enum from WidgetAttribute.</li></ul><h4><a aria-hidden="true" class="anchor" id="widgetinheritsclassname"></a><a aria-hidden="true" class="hash-link" href="#widgetinheritsclassname">#</a><code>widget.inherits(className)</code></h4><p>Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false. A class is considered to inherit itself. Example:</p><pre class="mdxCodeBlock_iHAB"><div class="codeBlockWrapper_2QGZ"><pre class="prism-code language-ts codeBlock_19pQ" style="color:#d6deeb;background-color:#011627"><div class="token-line" style="color:#d6deeb"><span class="token keyword" style="color:rgb(127, 219, 202)">const</span><span class="token plain"> progressBar </span><span class="token operator" style="color:rgb(127, 219, 202)">=</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(127, 219, 202)">new</span><span class="token plain"> </span><span class="token class-name" style="color:rgb(255, 203, 139)">QProgressBar</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span></div><div class="token-line" style="color:#d6deeb"><span class="token plain">progressBar</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token method function property-access" style="color:rgb(130, 170, 255)">inherits</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(173, 219, 103)">"QObject"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"> </span><span class="token comment" style="color:rgb(99, 119, 119);font-style:italic">// returns true</span><span class="token plain"></span></div><div class="token-line" style="color:#d6deeb"><span class="token plain">progressBar</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token method function property-access" style="color:rgb(130, 170, 255)">inherits</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(173, 219, 103)">"QProgressBar"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"> </span><span class="token comment" style="color:rgb(99, 119, 119);font-style:italic">// returns true</span><span class="token plain"></span></div><div class="token-line" style="color:#d6deeb"><span class="token plain">progressBar</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token method function property-access" style="color:rgb(130, 170, 255)">inherits</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(173, 219, 103)">"QTabWidget"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"> </span><span class="token comment" style="color:rgb(99, 119, 119);font-style:italic">// returns false</span></div></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_1BYj">Copy</button></div></pre><ul><li><code>className</code> string - Name of the class to get if this widget inherits from.</li></ul></div></article><div class="margin-top--xl margin-bottom--lg"><nav class="pagination-nav"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/api/NodeLayout"><h5 class="pagination-nav__link--sublabel">Previous</h5><h4 class="pagination-nav__link--label">« <!-- -->NodeLayout</h4></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/api/YogaWidget"><h5 class="pagination-nav__link--sublabel">Next</h5><h4 class="pagination-nav__link--label">YogaWidget<!-- --> »</h4></a></div></nav></div></div></div><div class="col col--3"><div class="tableOfContents_2wxO"><ul class="contents contents__left-border"><li><a href="#example" class="contents__link">Example</a></li><li><a href="#static-methods" class="contents__link">Static Methods</a></li><li><a href="#instance-properties" class="contents__link">Instance Properties</a><ul class=""><li><a href="#widgetlayout" class="contents__link">widget.layout</a></li><li><a href="#widgettype" class="contents__link">widget.type</a></li></ul></li><li><a href="#instance-methods" class="contents__link">Instance Methods</a><ul class=""><li><a href="#widgetshow" class="contents__link">widget.show()</a></li><li><a href="#widgetresizewidth-height" class="contents__link">widget.resize(width, height)</a></li><li><a href="#widgetclose" class="contents__link">widget.close()</a></li><li><a href="#widgetsetlayoutlayout" class="contents__link">widget.setLayout(layout)</a></li><li><a href="#widgetsetstylesheetstylesheet" class="contents__link">widget.setStyleSheet(styleSheet)</a></li><li><a href="#widgetsetcursorcursor" class="contents__link">widget.setCursor(cursor)</a></li><li><a href="#widgetsetwindowiconicon" class="contents__link">widget.setWindowIcon(icon)</a></li><li><a href="#widgetsetwindowstatestate" class="contents__link">widget.setWindowState(state)</a></li><li><a href="#widgetsetwindowtitletitle" class="contents__link">widget.setWindowTitle(title)</a></li><li><a href="#widgetstylesheet" class="contents__link">widget.styleSheet()</a></li><li><a href="#widgethide" class="contents__link">widget.hide()</a></li><li><a href="#widgetmovex-y" class="contents__link">widget.move(x, y)</a></li><li><a href="#widgetsetobjectnameobjectname" class="contents__link">widget.setObjectName(objectName)</a></li><li><a href="#widgetobjectname" class="contents__link">widget.objectName()</a></li><li><a href="#widgetsetmousetrackingismousetracked" class="contents__link">widget.setMouseTracking(isMouseTracked)</a></li><li><a href="#widgetsetenabledenabled" class="contents__link">widget.setEnabled(enabled)</a></li><li><a href="#widgetsetfixedsizewidth-height" class="contents__link">widget.setFixedSize(width, height)</a></li><li><a href="#widgetsetgeometryx-y-width-height" class="contents__link">widget.setGeometry(x, y, width, height)</a></li><li><a href="#widgetsetmaximumsizewidth-height" class="contents__link">widget.setMaximumSize(width, height)</a></li><li><a href="#widgetsetminimumsizewidth-height" class="contents__link">widget.setMinimumSize(width, height)</a></li><li><a href="#widgetrepaint" class="contents__link">widget.repaint()</a></li><li><a href="#widgetupdate" class="contents__link">widget.update()</a></li><li><a href="#widgetpos" class="contents__link">widget.pos()</a></li><li><a href="#widgetsize" class="contents__link">widget.size()</a></li><li><a href="#widgetupdategeometry" class="contents__link">widget.updateGeometry()</a></li><li><a href="#widgetsetattributeattributename-switchon" class="contents__link">widget.setAttribute(attributeName, switchOn)</a></li><li><a href="#widgettestattributeattributename" class="contents__link">widget.testAttribute(attributeName)</a></li></ul></li></ul></div></div></div></div></div></main></div></div>
|
|
</div>
|
|
|
|
<script type="text/javascript" src="/runtime~main.150b08511ef3a62ef297.js"></script>
|
|
|
|
<script type="text/javascript" src="/main.45a290f00dd7b6129c4a.js"></script>
|
|
|
|
<script type="text/javascript" src="/0.137079c7c6dfa44cbb19.js"></script>
|
|
|
|
<script type="text/javascript" src="/1.b3b40754e56fe7b933e8.js"></script>
|
|
|
|
<script type="text/javascript" src="/2.4dcc84845bb42710969e.js"></script>
|
|
|
|
<script type="text/javascript" src="/component---theme-doc-legacy-page-9-e-7-ca5.f5d90ad6613508f9bb4b.js"></script>
|
|
|
|
<script type="text/javascript" src="/docsMetadata---docs-150-2d6.b715e347b791ba241d91.js"></script>
|
|
|
|
<script type="text/javascript" src="/component---theme-doc-legacy-item-031-769.89c72f3cd114f0722210.js"></script>
|
|
|
|
<script type="text/javascript" src="/content---docs-api-node-widget-080-a39.25d47992ba66ab6276fa.js"></script>
|
|
|
|
<script type="text/javascript" src="/metadata---docs-api-node-widgeta-92-a4f.8b67d377500e70ea4010.js"></script>
|
|
|
|
</body>
|
|
</html> |