-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
PR: Add icon to MessageCheckBox while avoiding unclickable issue #4749
PR: Add icon to MessageCheckBox while avoiding unclickable issue #4749
Conversation
- The icon is passed as argument when initiating the MessageCheckBox. Thus, `setIcon` is called before adding a custom checkbox to the MessageCheckBox layout, avoiding the unclickable update message box issue. - Also, self is passed as parent to the MessageCheckBox. This allows to have the Spyder icon to show correctly on the left side corner of the popup window in Window OS. - Finally, when adding the custom checkbox to the MessageCheckBox layout, the position where the widget is added depends if PyQt4 or PyQt5 is used in order to take into account changes in Qt framework between Qt4 and Qt5.
@dalthviz, please test that @jnsebgosselin contribution works in PyQt5 as expected. |
spyder/widgets/helperwidgets.py
Outdated
@@ -71,8 +71,12 @@ def __init__(self, *args, **kwargs): | |||
check_layout.addItem(QSpacerItem(size, size)) | |||
|
|||
# Access the Layout of the MessageBox to add the Checkbox | |||
from qtpy import PYQT5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move this import to the top of the fie. There's no need to put it here.
- This was only needed for IPython 2, but we don't support that version anymore. - This was breaking displaying Dataframes as html tables in spyder-notebook.
PR: Don't set pandas.core.common.in_qtconsole anymore
@jnsebgosselin, please move this PR on your locale fork to the |
- The icon is passed as argument when initiating the MessageCheckBox. Thus, `setIcon` is called before adding a custom checkbox to the MessageCheckBox layout, avoiding the unclickable update message box issue. - Also, self is passed as parent to the MessageCheckBox. This allows to have the Spyder icon to show correctly on the left side corner of the popup window in Window OS. - Finally, when adding the custom checkbox to the MessageCheckBox layout, the position where the widget is added depends if PyQt4 or PyQt5 is used in order to take into account changes in Qt framework between Qt4 and Qt5.
…lin/spyder into 3.1.x-messagecheckbox
Add an icon to the MessageCheckBox while avoiding the unclickable update message issue in PyQt5 and preserving backward compatibility with PyQt4.
Please revised that this fix works correctly in PyQt5. I cannot install PyQt5 alongside PyQt4 without messing my installation on my current setup. Feel free to give me advice to improve the way I can contribute.