Title: TypeError: 'PySide2.QtCore.QRect' object is not subscriptable · Issue #63 · PlotPyStack/PythonQwt · GitHub
Open Graph Title: TypeError: 'PySide2.QtCore.QRect' object is not subscriptable · Issue #63 · PlotPyStack/PythonQwt
X Title: TypeError: 'PySide2.QtCore.QRect' object is not subscriptable · Issue #63 · PlotPyStack/PythonQwt
Description: Hi, I'm using setStyleSheet in my PySide2 application. If I add a QwtPlot I get the following exception: Traceback (most recent call last): File "C:\Users\user\project\venv\lib\site-packages\qwt\null_paintdevice.py", line 54, in drawRect...
Open Graph Description: Hi, I'm using setStyleSheet in my PySide2 application. If I add a QwtPlot I get the following exception: Traceback (most recent call last): File "C:\Users\user\project\venv\lib\site-packages\qwt\nu...
X Description: Hi, I'm using setStyleSheet in my PySide2 application. If I add a QwtPlot I get the following exception: Traceback (most recent call last): File "C:\Users\user\project\venv\lib\site-packag...
Opengraph URL: https://github.com/PlotPyStack/PythonQwt/issues/63
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"TypeError: 'PySide2.QtCore.QRect' object is not subscriptable","articleBody":"Hi,\r\n\r\nI'm using `setStyleSheet` in my PySide2 application. If I add a `QwtPlot` I get the following exception:\r\n\r\n```\r\nTraceback (most recent call last):\r\n File \"C:\\Users\\user\\project\\venv\\lib\\site-packages\\qwt\\null_paintdevice.py\", line 54, in drawRects\r\n device.drawRects(rects, rectCount)\r\n File \"C:\\Users\\user\\project\\venv\\lib\\site-packages\\qwt\\plot_canvas.py\", line 75, in drawRects\r\n self.border.rectList += [rects[i]]\r\nTypeError: 'PySide2.QtCore.QRect' object is not subscriptable\r\nTraceback (most recent call last):\r\n File \"C:\\Users\\user\\project\\venv\\lib\\site-packages\\qwt\\null_paintdevice.py\", line 54, in drawRects\r\n device.drawRects(rects, rectCount)\r\n File \"C:\\Users\\user\\project\\venv\\lib\\site-packages\\qwt\\plot_canvas.py\", line 75, in drawRects\r\n self.border.rectList += [rects[i]]\r\nTypeError: 'PySide2.QtCore.QRect' object is not subscriptable\r\nTraceback (most recent call last):\r\n File \"C:\\Users\\user\\project\\venv\\lib\\site-packages\\qwt\\null_paintdevice.py\", line 54, in drawRects\r\n device.drawRects(rects, rectCount)\r\n File \"C:\\Users\\user\\project\\venv\\lib\\site-packages\\qwt\\plot_canvas.py\", line 75, in drawRects\r\n self.border.rectList += [rects[i]]\r\nTypeError: 'PySide2.QtCore.QRect' object is not subscriptable\r\nTraceback (most recent call last):\r\n File \"C:\\Users\\user\\project\\venv\\lib\\site-packages\\qwt\\null_paintdevice.py\", line 54, in drawRects\r\n device.drawRects(rects, rectCount)\r\n File \"C:\\Users\\user\\project\\venv\\lib\\site-packages\\qwt\\plot_canvas.py\", line 75, in drawRects\r\n self.border.rectList += [rects[i]]\r\nTypeError: 'PySide2.QtCore.QRect' object is not subscriptable\r\nTraceback (most recent call last):\r\n File \"C:\\Users\\user\\project\\venv\\lib\\site-packages\\qwt\\scale_widget.py\", line 406, in paintEvent\r\n painter.setClipRegion(event.region())\r\nAttributeError: 'PySide2.QtCore.QRect' object has no attribute 'region'\r\nTraceback (most recent call last):\r\n File \"C:\\Users\\user\\project\\venv\\lib\\site-packages\\qwt\\null_paintdevice.py\", line 54, in drawRects\r\n device.drawRects(rects, rectCount)\r\n File \"C:\\Users\\user\\project\\venv\\lib\\site-packages\\qwt\\plot_canvas.py\", line 75, in drawRects\r\n self.border.rectList += [rects[i]]\r\nTypeError: 'PySide2.QtCore.QRect' object is not subscriptable\r\n```\r\n\r\nExample code to reproduce the exception\r\n\r\n```python\r\nimport PySide2.QtWidgets as QtWidgets\r\nimport qwt\r\nimport sys\r\n\r\n\r\nclass SimplePlot(QtWidgets.QWidget):\r\n def __init__(self):\r\n super(SimplePlot, self).__init__()\r\n\r\n self.layout = QtWidgets.QHBoxLayout()\r\n self.setLayout(self.layout)\r\n self.plot_widget = qwt.QwtPlot()\r\n self.plot_widget.setTitle(\"Really simple demo\")\r\n self.layout.addWidget(self.plot_widget)\r\n\r\n self.setStyleSheet(\"background-color: red;\")\r\n\r\n\r\nif __name__ == \"__main__\":\r\n app = QtWidgets.QApplication(sys.argv)\r\n foo = SimplePlot()\r\n foo.show()\r\n\r\n sys.exit(app.exec_())\r\n```\r\n","author":{"url":"https://github.com/fvollmer","@type":"Person","name":"fvollmer"},"datePublished":"2021-08-17T09:54:02.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/63/PythonQwt/issues/63"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ea60d52c-493f-1449-ca40-b5e76e0bc6d5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E022:25602F:CD9AA2C:10C29E9B:6976934A |
| html-safe-nonce | 25e7a778f17480954b9d2dc55236d74206e4a3c55ad6277aa70e2c70cfb155a8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMDIyOjI1NjAyRjpDRDlBQTJDOjEwQzI5RTlCOjY5NzY5MzRBIiwidmlzaXRvcl9pZCI6IjY0ODA0MzU0NTYxNDY1NzYyMDIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ca8def629298dda6810dc0689f02518e74b97ae92b09997e38d76d502de61016 |
| hovercard-subject-tag | issue:972507224 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PlotPyStack/PythonQwt/63/issue_layout |
| twitter:image | https://opengraph.githubassets.com/11e02ecd39bcaadf86b03a2c01dd62972d4246aa9800d7f1b0149b69bc0e37b1/PlotPyStack/PythonQwt/issues/63 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/11e02ecd39bcaadf86b03a2c01dd62972d4246aa9800d7f1b0149b69bc0e37b1/PlotPyStack/PythonQwt/issues/63 |
| og:image:alt | Hi, I'm using setStyleSheet in my PySide2 application. If I add a QwtPlot I get the following exception: Traceback (most recent call last): File "C:\Users\user\project\venv\lib\site-packages\qwt\nu... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | fvollmer |
| hostname | github.com |
| expected-hostname | github.com |
| None | 032152924a283b83384255d9489e7b93b54ba01da8d380b05ecd3953b3212411 |
| turbo-cache-control | no-preview |
| go-import | github.com/PlotPyStack/PythonQwt git https://github.com/PlotPyStack/PythonQwt.git |
| octolytics-dimension-user_id | 145201262 |
| octolytics-dimension-user_login | PlotPyStack |
| octolytics-dimension-repository_id | 41204495 |
| octolytics-dimension-repository_nwo | PlotPyStack/PythonQwt |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 41204495 |
| octolytics-dimension-repository_network_root_nwo | PlotPyStack/PythonQwt |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 5b577f6be6482e336e3c30e8daefa30144947b17 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width