Copy/Paste Hotkeys Not Working in Python Panel

   1632   3   2
User Avatar
Member
183 posts
Joined: Dec. 2011
Offline
So I built a custom asset manager panel based on the tutorials by Varomix and have noticed that houdini 16.0 doesn't seem to understand when I bring the panel into focus. This results in me being unable to use hotkeys to paste, copy, or cut text in the QLineEdit fields, although surprisingly command-Z still works for undoing changes. Instead, houdini tends to paste any relevant information in my clipboard into the last non-python window I had active.

Any ideas how to fix this? For now I am stuck using the right-click context menu to do these operations.
User Avatar
Member
183 posts
Joined: Dec. 2011
Offline
So I am still trying to figure out this issue. I've tried forcing the QLineEdit to be in focus, but Houdini is still intercepting my keyboard's clipboard commands.

Below is the simple program I am running. Basically it is just a text field that I expect to be able to copy and paste from. Any idea what I am doing wrong?

from PySide2 import QtCore, QtWidgets


from PySide2 import QtCore, QtWidgets

class TextField(QtWidgets.QLineEdit):

    def __init__(self, parent):
        super(TextField, self).__init__(parent)

        self.setPlaceholderText('Hello World')
        self.setFocusPolicy(QtCore.Qt.StrongFocus)


class Example(QtWidgets.QWidget):

    def __init__(self):
        super(Example, self).__init__()

        tf = TextField(self)
        tf.move(30, 65)

        tf.setFocus()
Edited by NFX - Jan. 22, 2018 15:08:50
User Avatar
Staff
1255 posts
Joined: July 2005
Offline
Hello,

By any chance are you running on a Mac? There's a known issue where the Mac menu bar in Houdini steals the copy and paste hotkeys from Python Panels.

Cheers,
Rob
User Avatar
Member
183 posts
Joined: Dec. 2011
Offline
Yep. I'm on a Mac.

So this is a bug then? Oh well. I guess I still have the option of copy pasting from the context menu.
  • Quick Links