-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9385a64
commit d7960f6
Showing
5 changed files
with
182 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
{ | ||
"metadata": { | ||
"kernelspec": { | ||
"name": "qt-python" | ||
}, | ||
"language_info": { | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"version": "3.12.0rc3" | ||
} | ||
}, | ||
"nbformat_minor": 5, | ||
"nbformat": 4, | ||
"cells": [ | ||
{ | ||
"id": "82774918-e61b-4383-b44d-ad2739ff5e34", | ||
"cell_type": "code", | ||
"source": "from kernel_widget import get_kernel_widget\nfrom PyQt5.QtWidgets import QPushButton", | ||
"metadata": { | ||
"trusted": true | ||
}, | ||
"outputs": [], | ||
"execution_count": null | ||
}, | ||
{ | ||
"id": "f249770b-d42c-4432-953c-36ae94ee850b", | ||
"cell_type": "code", | ||
"source": "button = QPushButton()\nbutton.setText(\"black magic\")", | ||
"metadata": { | ||
"trusted": true | ||
}, | ||
"outputs": [], | ||
"execution_count": null | ||
}, | ||
{ | ||
"id": "9aa5486b-ff9b-46a4-b661-b2634bcbdec8", | ||
"cell_type": "code", | ||
"source": "def say_hello():\n print(\"hello from here\")", | ||
"metadata": { | ||
"trusted": true | ||
}, | ||
"outputs": [], | ||
"execution_count": null | ||
}, | ||
{ | ||
"id": "ab7d7956-10d3-4032-9e8f-9b67ac5984b1", | ||
"cell_type": "code", | ||
"source": "button.clicked.connect(say_hello)", | ||
"metadata": { | ||
"trusted": true | ||
}, | ||
"outputs": [], | ||
"execution_count": null | ||
}, | ||
{ | ||
"id": "02ee9a0a-27d1-4706-8e9c-32fed24bf24f", | ||
"cell_type": "code", | ||
"source": "get_kernel_widget().layout.addWidget(button)", | ||
"metadata": { | ||
"trusted": true | ||
}, | ||
"outputs": [], | ||
"execution_count": null | ||
}, | ||
{ | ||
"id": "2d724999-921f-438c-afa8-aeef905e4ef6", | ||
"cell_type": "code", | ||
"source": "", | ||
"metadata": { | ||
"trusted": true | ||
}, | ||
"outputs": [], | ||
"execution_count": null | ||
} | ||
] | ||
} |
Oops, something went wrong.