Skip to content

BUG: Fix linux Qt clipboard QApplication() creation #14371

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix linux Qt clipboard, creating QApplication only if needed
A Qt application cannot instantiate multiple `QApplication` instances,
so we create a new `QApplication` only when the global
`QApplication.instance()` is None.
  • Loading branch information
pankajp authored Oct 7, 2016
commit 09eb6951db92bea2fd73562e619f92dec4bb7d05
2 changes: 1 addition & 1 deletion pandas/util/clipboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def _pasteKlipper():
copy = _copyGtk
elif qtBindingInstalled:
_functions = 'PyQt4 module' # for debugging
app = QtGui.QApplication([])
app = QtGui.QApplication.instance() or QtGui.QApplication([])
cb = QtGui.QApplication.clipboard()
paste = _pasteQt
copy = _copyQt
Expand Down