Hey,
I made a little GUI using PySide2 QtWidgets and I have a QLineEdit that I want to be able to populate using information from a node.
For example, I'd like to drag a Filecache node over the input field and then have the input field populated with the output location of the filecache.
I've seen similar functionality inside Houdini itself.
I've added:
self.setAcceptDrops(True)
and
self.bgeoInput.setDragEnabled(True)
But that only works if a drag a file from windows explorer onto my input field.
Has anyone done this before?
Thanks,
How to drag drop Houdini Node onto QtWidgets.QLineEdit
2295 4 2- GlassworksEng
- Member
- 10 posts
- Joined: July 2014
- Offline
- friedasparagus
- Member
- 402 posts
- Joined: June 2014
- Offline
- GlassworksEng
- Member
- 10 posts
- Joined: July 2014
- Offline
- pisces
- Member
- 10 posts
- Joined: Nov. 2015
- Offline
- GlassworksEng
- Member
- 10 posts
- Joined: July 2014
- Offline
pisces
@eng, I am curious did you solve the problem, I run into the same problem
Hey, I ended up just populating it by opening up an Explorer window to a specific location (to allow the user to select a file):
def selectInputFileSeq(self): textboxValue=QtWidgets.QFileDialog.getOpenFileName(self, 'Select file from bgeo sequence', currentHipFileLocation, '*.bgeo.sc') if textboxValue: try: bgeo = str(textboxValue[0]).split(".")[:-3][0] + ".$F4.bgeo.sc" self.bgeoInput.setText(bgeo) except: print "Please slecet a .bgeo.sc file!" else: print "Nothing selected!"
Not what you're after exactly, but I hope it helps.
Edited by GlassworksEng - Nov. 2, 2018 12:47:32
-
- Quick Links