Comments (8)
Given the following code:
from pyface.api import AboutDialog
dl = AboutDialog(title='TITLEHERE')
import ipdb; ipdb.set_trace()
dl.open()
If i intercept the creation of the dialog, at https://github.com/enthought/pyface/blob/master/pyface/ui/qt4/about_dialog.py#L79
it looks like parent.parent()
is resolving to None
, resulting in the title
attribute being reset.
Confirmed, if I skip this if/else clause, I get the desired behavior
from pyface.
Confirm problem, this is a high priority bug.
from pyface.
Looks like the whole section has some bogus code: eg. https://github.com/enthought/pyface/blob/master/pyface/ui/qt4/about_dialog.py#L85 looks dubious.
Fix looks straightforward (title should be being set when control is created, not when contents are created, which is handled by the base Dialog class already). Bonus points for adding a trait change handler to the title trait... so who wants to do it?
from pyface.
I think the code for setting the default title https://github.com/enthought/pyface/blob/master/pyface/ui/qt4/about_dialog.py#L85 should be fine if it is only executed when self.title
is an empty string.
from pyface.
But even better would just be to have a default title
trait for about dialogs to be "About" or "About Dialog" or something similar.
from pyface.
The ticket is not specific to AboutDialogs, we have this problem with error dialogs.
from pyface.
From the Qt documentation for QMessageBox.setWindowTitle
:
Sets the title of the message box to title. On macOS, the window title is ignored (as required by the macOS Guidelines).
from pyface.
To add more information: the error dialogs that @pberkes was referring to use PyFace's MessageDialog, which under Qt uses QMessageBox. So the fact that we're not seeing the title on those under macOS is unrelated to this issue, and arguably isn't a bug.
The original issue with the "about" dialog still persists.
from pyface.
Related Issues (20)
- Standardize toolkit checks
- We should handle TraitsUI helpers better in `GUITestAssistant`
- Bug report: SystemMetrics error on headless macos
- importing QSvgWidget from PySide6 no longer works HOT 1
- Remove `EDM_ROOT_DIRECTORY` from CI
- Error in the Pyface 8.0.0 release notes
- Bug report: NotImplementedError wx test failure with 8.0.0 HOT 1
- Drop support for PyQt5
- TaskWindows should have clear API for adding a dock pane in a location
- Bug report: test failures on s390x HOT 2
- Bug report: pyqt6 test failure HOT 1
- Bug report: AttributeError: type object 'QFont' has no attribute 'Decorative' HOT 3
- Bug report: 8.0.0 pyqt6 test_add_to_menu fails HOT 1
- Toolbars are not created in pyface 8.0 HOT 1
- Bug report: (some) tests should be skipped when ETS_TOOLKIT=qt4 HOT 1
- Bug report: Include all license files into the wheel
- Bug report: image_volume.py time_stamp breaks reproducible builds HOT 5
- Bug report: test failures with PyQt5 HOT 4
- Add WxPython to EDM Python 3.8 test suites
- Bug report: Tests halt on Rocky Linux 8 using PySide6-6.7.1 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyface.