Discussion:
[Maya-Python] Is it possible to add QPushButton to QFileDialog?
Adam Baker
2018-11-15 03:58:03 UTC
Permalink
Hey all,

I am trying to add a QPushButton or any other QWidget to a QFileDialog.
*from PySide2 import QtWidgets, QtCore, QtGui**class
fileOpen(QtWidgets.QFileDialog):*
* def __init__(self):*
* super(fileOpen, self).__init__()*
* self.setWindowTitle("ATK Open File")**
self.setObjectName('ATKOpenFile')*
* self.buildUI()*
* def buildUI(self):*
* btnLayout = QtWidgets.QHBoxLayout()*
* self.setLayout(btnLayout)*
* btn = QtWidgets.QPushButton('Click')**
btnLayout.addWidget(btn)*
*def showUI():*
* ui = fileOpen()*
* ui.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)*
* ui.show()** return ui*
The problem is that the button now takes up the while window and the
QFileDialog gets pushed to the upper corner collapsing on it's self.

Thanks
Adam
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/1633c52d-e9ce-4b4c-b09b-d4298883baf4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Michael Boon
2018-11-15 05:31:41 UTC
Permalink
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.
Post by Adam Baker
Hey all,
I am trying to add a QPushButton or any other QWidget to a QFileDialog.
*from PySide2 import QtWidgets, QtCore, QtGui**class
fileOpen(QtWidgets.QFileDialog):*
* def __init__(self):*
* super(fileOpen, self).__init__()*
* self.setWindowTitle("ATK Open File")**
self.setObjectName('ATKOpenFile')*
* self.buildUI()*
* def buildUI(self):*
* btnLayout = QtWidgets.QHBoxLayout()*
* self.setLayout(btnLayout)*
* btn = QtWidgets.QPushButton('Click')**
btnLayout.addWidget(btn)*
*def showUI():*
* ui = fileOpen()*
* ui.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)*
* ui.show()** return ui*
The problem is that the button now takes up the while window and the
QFileDialog gets pushed to the upper corner collapsing on it's self.
Thanks
Adam
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/46815b6a-7798-438f-a1b7-61ced6e1b479%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Justin Israel
2018-11-15 05:35:03 UTC
Permalink
QFileDialog is a composite widget, which already has its own layout and
children. When you call setLayout, you are replacing the existing one with
your own. This causes all of the existing widgets to lose their layout
constraints. If you want to add more widgets, then you will have to work
with the existing layout and child widgets. What kind of arrangement are
you looking for with your new push button? There may be a better way to do
it instead of messing with the layout, such as modifying the
QDialogButtonBox:

buttonBox = self.findChild(QtWidgets.QDialogButtonBox)
# add button and wire up signal to something
Post by Adam Baker
Hey all,
I am trying to add a QPushButton or any other QWidget to a QFileDialog.
*from PySide2 import QtWidgets, QtCore, QtGui**class
fileOpen(QtWidgets.QFileDialog):*
* def __init__(self):*
* super(fileOpen, self).__init__()*
* self.setWindowTitle("ATK Open File")**
self.setObjectName('ATKOpenFile')*
* self.buildUI()*
* def buildUI(self):*
* btnLayout = QtWidgets.QHBoxLayout()*
* self.setLayout(btnLayout)*
* btn = QtWidgets.QPushButton('Click')**
btnLayout.addWidget(btn)*
*def showUI():*
* ui = fileOpen()*
* ui.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)*
* ui.show()** return ui*
The problem is that the button now takes up the while window and the
QFileDialog gets pushed to the upper corner collapsing on it's self.
Thanks
Adam
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/1633c52d-e9ce-4b4c-b09b-d4298883baf4%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/1633c52d-e9ce-4b4c-b09b-d4298883baf4%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA04iyr_t_mjzRnUHTHUqg5BzsfTmhiDC_obkO-g3vxoEQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Adam Baker
2018-11-15 13:38:30 UTC
Permalink
I think adding it using the find child should work. I am not only trying to
adding a QPushButton but also add a QTextEdit to show the user more
information about the file.

Thanks,
- Adam
Post by Justin Israel
QFileDialog is a composite widget, which already has its own layout and
children. When you call setLayout, you are replacing the existing one with
your own. This causes all of the existing widgets to lose their layout
constraints. If you want to add more widgets, then you will have to work
with the existing layout and child widgets. What kind of arrangement are
you looking for with your new push button? There may be a better way to do
it instead of messing with the layout, such as modifying the
buttonBox = self.findChild(QtWidgets.QDialogButtonBox)
# add button and wire up signal to something
Post by Adam Baker
Hey all,
I am trying to add a QPushButton or any other QWidget to a QFileDialog.
*from PySide2 import QtWidgets, QtCore, QtGui**class
fileOpen(QtWidgets.QFileDialog):*
* def __init__(self):*
* super(fileOpen, self).__init__()*
* self.setWindowTitle("ATK Open File")**
self.setObjectName('ATKOpenFile')*
* self.buildUI()*
* def buildUI(self):*
* btnLayout = QtWidgets.QHBoxLayout()*
* self.setLayout(btnLayout)*
* btn = QtWidgets.QPushButton('Click')**
btnLayout.addWidget(btn)*
*def showUI():*
* ui = fileOpen()*
* ui.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)*
* ui.show()** return ui*
The problem is that the button now takes up the while window and the
QFileDialog gets pushed to the upper corner collapsing on it's self.
Thanks
Adam
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/1633c52d-e9ce-4b4c-b09b-d4298883baf4%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/1633c52d-e9ce-4b4c-b09b-d4298883baf4%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/149bc1b1-a649-4fa5-bce2-566f8a00c1d5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Adam Baker
2018-11-15 14:23:07 UTC
Permalink
I tried looking for the child and I keep getting None so I can’t add that layout to another layout or add a button to its layout. I am not just trying to adding a QPushButton but also add a QTextEdit to show the user more information about the file. My idea to add all the UI elements I want was to get the layout of the QfileDialog add that to a HBoxlayout. This will allow me to add UI elements off to the right of the QFileDialog’s layout.

Thanks,
- Adam
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/9baad844-e50d-4687-af71-e2aa0d26e8f7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Tim Fowler
2018-11-15 16:12:25 UTC
Permalink
I think that is exactly what Maya's file dialog does. Derives from
QFileDialog, grabs its main layout, then adds all the options UI to the end
of the HBoxLayout. I'm not 100% sure, but I think just calling
QWidget::layout (from the derived parent class of the dialog) gives you the
hbox that you're looking for to add something off to the right. To edit
other things you might have to do a "findChildren" with a specific name.
Post by Adam Baker
I tried looking for the child and I keep getting None so I can’t add that
layout to another layout or add a button to its layout. I am not just
trying to adding a QPushButton but also add a QTextEdit to show the user
more information about the file. My idea to add all the UI elements I want
was to get the layout of the QfileDialog add that to a HBoxlayout. This
will allow me to add UI elements off to the right of the QFileDialog’s
layout.
Thanks,
- Adam
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/9baad844-e50d-4687-af71-e2aa0d26e8f7%40googlegroups.com
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CALKD2WrM0Vx-i6UoyYAPeraDmTadR7TdwfSSoGwRzjFcE1SFdg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
a***@spinvfx.com
2018-11-16 01:25:23 UTC
Permalink
Post by Adam Baker
Hey all,
I am trying to add a QPushButton or any other QWidget to a QFileDialog.
from PySide2 import QtWidgets, QtCore, QtGui
        super(fileOpen, self).__init__()
        self.setWindowTitle("ATK Open File")
        self.setObjectName('ATKOpenFile')
        self.buildUI()
        btnLayout = QtWidgets.QHBoxLayout()
        self.setLayout(btnLayout)
        btn = QtWidgets.QPushButton('Click')
        btnLayout.addWidget(btn)
    ui = fileOpen()
    ui.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)
    ui.show()
    return ui
The problem is that the button now takes up the while window and the QFileDialog gets pushed to the upper corner collapsing on it's self.
Thanks
Adam
This is my latest method that seams to be working. The only problem I have found is that I am unable to remove the size control form the QFileDialog. I am going to continue to try and make it function more like the maya open file with the Sizeable window on the right side.

https://pastebin.com/DzemqXNc

Please let me know if you have any more ideas.

- Adam B.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/cf6202ef-bff7-412a-ba4e-8ee25f5b4fc6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Justin Israel
2018-11-16 02:19:33 UTC
Permalink
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.
Post by Adam Baker
Post by Adam Baker
Hey all,
I am trying to add a QPushButton or any other QWidget to a QFileDialog.
from PySide2 import QtWidgets, QtCore, QtGui
super(fileOpen, self).__init__()
self.setWindowTitle("ATK Open File")
self.setObjectName('ATKOpenFile')
self.buildUI()
btnLayout = QtWidgets.QHBoxLayout()
self.setLayout(btnLayout)
btn = QtWidgets.QPushButton('Click')
btnLayout.addWidget(btn)
ui = fileOpen()
ui.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)
ui.show()
return ui
The problem is that the button now takes up the while window and the
QFileDialog gets pushed to the upper corner collapsing on it's self.
Post by Adam Baker
Thanks
Adam
This is my latest method that seams to be working. The only problem I have
found is that I am unable to remove the size control form the QFileDialog.
I am going to continue to try and make it function more like the maya open
file with the Sizeable window on the right side.
https://pastebin.com/DzemqXNc
Please let me know if you have any more ideas.
- Adam B.
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/cf6202ef-bff7-412a-ba4e-8ee25f5b4fc6%40googlegroups.com
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA330X7Kw9bw2tRXMWYTzag1bgQB3RUi1s%2Bk3RxE6%3DQ%2Brw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Adam Baker
2018-11-16 07:20:55 UTC
Permalink
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
Post by 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.
Post by Adam Baker
Post by Adam Baker
Hey all,
I am trying to add a QPushButton or any other QWidget to a QFileDialog.
from PySide2 import QtWidgets, QtCore, QtGui
super(fileOpen, self).__init__()
self.setWindowTitle("ATK Open File")
self.setObjectName('ATKOpenFile')
self.buildUI()
btnLayout = QtWidgets.QHBoxLayout()
self.setLayout(btnLayout)
btn = QtWidgets.QPushButton('Click')
btnLayout.addWidget(btn)
ui = fileOpen()
ui.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)
ui.show()
return ui
The problem is that the button now takes up the while window and the
QFileDialog gets pushed to the upper corner collapsing on it's self.
Post by Adam Baker
Thanks
Adam
This is my latest method that seams to be working. The only problem I
have found is that I am unable to remove the size control form the
QFileDialog. I am going to continue to try and make it function more like
the maya open file with the Sizeable window on the right side.
https://pastebin.com/DzemqXNc
Please let me know if you have any more ideas.
- Adam B.
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/cf6202ef-bff7-412a-ba4e-8ee25f5b4fc6%40googlegroups.com
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/dc53b860-3b14-48dd-a269-91f2465ec2b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Justin Israel
2018-11-16 11:00:34 UTC
Permalink
Again, I would suggest not using a QMainWindow here, because it requires
that you do setCentralWidget as opposed to setting a custom layout.
Post by 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
Post by 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.
Post by Adam Baker
Post by Adam Baker
Hey all,
I am trying to add a QPushButton or any other QWidget to a QFileDialog.
from PySide2 import QtWidgets, QtCore, QtGui
super(fileOpen, self).__init__()
self.setWindowTitle("ATK Open File")
self.setObjectName('ATKOpenFile')
self.buildUI()
btnLayout = QtWidgets.QHBoxLayout()
self.setLayout(btnLayout)
btn = QtWidgets.QPushButton('Click')
btnLayout.addWidget(btn)
ui = fileOpen()
ui.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)
ui.show()
return ui
The problem is that the button now takes up the while window and the
QFileDialog gets pushed to the upper corner collapsing on it's self.
Post by Adam Baker
Thanks
Adam
This is my latest method that seams to be working. The only problem I
have found is that I am unable to remove the size control form the
QFileDialog. I am going to continue to try and make it function more like
the maya open file with the Sizeable window on the right side.
https://pastebin.com/DzemqXNc
Please let me know if you have any more ideas.
- Adam B.
--
You received this message because you are subscribed to the Google
Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/cf6202ef-bff7-412a-ba4e-8ee25f5b4fc6%40googlegroups.com
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/dc53b860-3b14-48dd-a269-91f2465ec2b6%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/dc53b860-3b14-48dd-a269-91f2465ec2b6%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2-LRnpKkwOm3npYQYowYq%2BbsUQ8rT-hBUL_nPSh9fGsg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Adam Baker
2018-11-16 14:41:39 UTC
Permalink
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 this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/a328373e-1fce-47f7-af52-5aee20328636%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Justin Israel
2018-11-17 04:42:38 UTC
Permalink
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 2.x however, it completely doesn't work and pops up two
individual widgets. It seems in Qt5 the QFileDialog is doing some late
layout at the time its actually shown, so the child layouts and widgets
aren't available yet.
Post by 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 this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/a328373e-1fce-47f7-af52-5aee20328636%40googlegroups.com
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1_n-KSW36av3x%2BZr9ehGZb2EB8oRjpuCmadR6J_vFOwQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Adam Baker
2018-11-17 05:05:45 UTC
Permalink
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.
Post by 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 2.x however, it completely doesn't work and pops up two
individual widgets. It seems in Qt5 the QFileDialog is doing some late
layout at the time its actually shown, so the child layouts and widgets
aren't available yet.
Post by 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 this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/a328373e-1fce-47f7-af52-5aee20328636%40googlegroups.com
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/a56eda2e-f966-423e-a50c-3a1136a737a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Justin Israel
2018-11-17 05:18:26 UTC
Permalink
Post by 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?
I don't really have any suggestions since I see it works differently in
PySide 1.x vs 2.x. The QFileDialog relies on system native calls so it
would be difficult I think to completely customise the existing one through
Qt.
Post by Adam Baker
- Adam B.
Post by 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 2.x however, it completely doesn't work and pops up two
individual widgets. It seems in Qt5 the QFileDialog is doing some late
layout at the time its actually shown, so the child layouts and widgets
aren't available yet.
Post by 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 this message because you are subscribed to the Google
Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/a328373e-1fce-47f7-af52-5aee20328636%40googlegroups.com
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/a56eda2e-f966-423e-a50c-3a1136a737a1%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/a56eda2e-f966-423e-a50c-3a1136a737a1%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0k4EgmPmHaJ6P4mw8zFwB2FfXyhoYRydEMTOvpyO%2BOkA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...