Re: [Maya-Python] Re: Is it possible to add QPushButton to QFileDialog?

2018-11-16 Thread Justin Israel
On Sat, Nov 17, 2018 at 6:05 PM Adam Baker wrote: > Ahah no worries. After all this info do you have any suggestions on how I > can edit the QFileDialog and add the extra widgets in on the right hand > side? > I don't really have any suggestions since I see it works differently in PySide 1.x vs

Re: [Maya-Python] Re: Is it possible to add QPushButton to QFileDialog?

2018-11-16 Thread Adam Baker
Ahah no worries. After all this info do you have any suggestions on how I can edit the QFileDialog and add the extra widgets in on the right hand side? - Adam B. On Friday, 16 November 2018 23:42:53 UTC-5, Justin Israel wrote: > > Oh sorry about that. I was reading it wrong multiple times :-)

Re: [Maya-Python] Re: Is it possible to add QPushButton to QFileDialog?

2018-11-16 Thread Justin Israel
Oh sorry about that. I was reading it wrong multiple times :-) For me, your example mostly works as expected on linux under PySide 1.x. But the reject signal is still mapped to the QFileDialog so when you hit ESC, the QFileDialog disappears and leaves behind your button and main widget. On PySide

Re: [Maya-Python] Re: Is it possible to add QPushButton to QFileDialog?

2018-11-16 Thread Adam Baker
Hey Justin, I am using a QWidget.QDialog here. I named the class “MainWindow” so I think your getting it mixed up. Sorry for that should have been more clear with my class names. Any other ideas why I’d have this problem on OSX ? Haven’t tested with Windows yet. -Adam -- You received

Re: [Maya-Python] Re: Is it possible to add QPushButton to QFileDialog?

2018-11-16 Thread Justin Israel
Again, I would suggest not using a QMainWindow here, because it requires that you do setCentralWidget as opposed to setting a custom layout. On Fri, Nov 16, 2018, 8:20 PM Adam Baker wrote: > I was testing my code I posted in OSX and notices that its not behaving > the same as on Linux. It will

Re: [Maya-Python] Re: Is it possible to add QPushButton to QFileDialog?

2018-11-15 Thread Adam Baker
I was testing my code I posted in OSX and notices that its not behaving the same as on Linux. It will create two separate windows one for the FileDalog and another for the pushbutton. Would anyone have a clue why it would do this ? - Adam On Thursday, 15 November 2018 21:19:49 UTC-5, Justin

Re: [Maya-Python] Re: Is it possible to add QPushButton to QFileDialog?

2018-11-15 Thread Justin Israel
My only suggestion for that code is that you probably don't need a QMainWindow, since you aren't even setting the setCentralWidget. You could just make it a QWidget or QDialog that nests the QFileDialog. If you made it a QDialog, then it would be easy to wire up the QFileDialog signals to it. On

[Maya-Python] Re: Is it possible to add QPushButton to QFileDialog?

2018-11-15 Thread abaker
On Wednesday, November 14, 2018 at 10:58:03 PM UTC-5, Adam Baker wrote: > Hey all, > > > I am trying to add a QPushButton or any other QWidget to a QFileDialog. > > > Here is where I currently am: > > from PySide2 import QtWidgets, QtCore, QtGui > class fileOpen(QtWidgets.QFileDialog): >    

[Maya-Python] Re: Is it possible to add QPushButton to QFileDialog?

2018-11-14 Thread Michael Boon
I don't have it in front of me, but I think you need to use the existing layout instead of creating a new one. So in your buildUI, you need to call self.layout(), or self.centralWidget().layout() or something like that. Then examine that and figure out where you want to put your button in it.