Skip to content

Commit

Permalink
Update examples/clipboard_.py to fix FutureWarning (#6365)
Browse files Browse the repository at this point in the history
Closes #6364

I've updated the example script to no longer access the clipboard via
`viewer.window.qt_viewer.clipboard` (which we plan to deprecate).
Instead we now use `viewer.window.clipboard` directly (which is part of
the external API).

Related:
* #3765
* #6283
  • Loading branch information
GenevieveBuckley committed Oct 26, 2023
1 parent cf3ad37 commit 08cd9fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/clipboard_.py
Expand Up @@ -34,8 +34,8 @@ def create_grabber_widget():
widget = Grabber()

# connect buttons
widget.copy_canvas_btn.clicked.connect(lambda: viewer.window.qt_viewer.clipboard())
widget.copy_viewer_btn.clicked.connect(lambda: viewer.window.clipboard())
widget.copy_canvas_btn.clicked.connect(lambda: viewer.window.clipboard(canvas_only=True))
widget.copy_viewer_btn.clicked.connect(lambda: viewer.window.clipboard(canvas_only=False))
return widget


Expand Down

0 comments on commit 08cd9fe

Please sign in to comment.