Comments (7)
Hi @Czaki thank you for the feedback! I think that makes sense to improve the situation here with the QFileDialog
👍
Thinking about this, not totally sure but, maybe this is already covered by the wrapper function we have for the QFileDialog
at:
Lines 82 to 102 in 1874fba
And the respective functions for the static methods like for example getSaveFileName
at:
Lines 129 to 138 in 1874fba
?
Let us know if the current wrapper definition helps or if some modification needs to be done and of course happy to see a PR if that is the case!
from qtpy.
This wrapper looks to solve the problem, but I need to figure out the discoverability of this feature as many people may use only Qt/PySide documentation and do not find the compat module.
from qtpy.
I took a quick look to @Czaki's PR and I think it's a good idea because it'd make things consistent between PyQt and PySide.
from qtpy.
That's a good point! Just in case, for the moment we have a very basic reference to the compat module in the README any idea to improve that is appreciated!
from qtpy.
One aspect in which the provided wrappers are not feature complete is when applications wish to customize the user experience such as with the "history"
napari uses:
dlg = QFileDialog()
hist = get_save_history()
dlg.setHistory(hist)
filename, selected_filter = dlg.getSaveFileName(
parent=self,
caption=trans._('Save {msg} layers', msg=msg),
directory=hist[0], # home dir by default,
....
)
which requires:
- The use of the method
setHistory
- a common interface for
directory
vsdir
Maybe I am missing one aspect of the compat module, but I didn't see a clear way of getting there from browsing the source of the compat.py
module.
from qtpy.
I have created #433 which may be a proper solution. There are currently no tests so it is marked as a draft but I would like to hear what did you think about this.
from qtpy.
Thanks for the feedback and proposing a solution! To be honest I'm not totally sure what could be the best here 🤔, what do you think @ccordoba12 ?
from qtpy.
Related Issues (20)
- Some compatibility issues when using latest PyQt6 or PySide6 (6.5+) HOT 1
- Type hints not working for `qtpy` specific imports HOT 7
- Try to retrieve `QT_API` from file if not set in env variable HOT 6
- Release QtPy 2.4.0 HOT 1
- Testssuite fails to run: pytest.PytestDeprecationWarning: The hookimpl CovPlugin.pytest_configure_node uses old-style configuration options HOT 2
- Typo causes failed QWebEngineScript with PySide6 HOT 4
- Release QtPy 2.4.1 HOT 1
- Qt namespace is littered with service functions HOT 2
- `uic.py` inconsistencies and logic errors
- Odd code found for `PyQt6`: always raises an exception
- QtBindingsNotFoundError on Importing Spyder with Python 3.11.6 HOT 7
- QMenu.add_action() got an unexpected keyword argument 'shortcut' HOT 3
- Why can't I import QAction normally using qtpy? HOT 1
- Allow to specify Qt version via an environment variable (`QT_VERSION`) HOT 4
- BUG: Incompatible with PySide6 6.7.0 HOT 3
- 30 tests fail HOT 1
- Qtpy is non-functional with PySide 6.7.0 HOT 12
- Type stubs? Possible integration with PyQt5-stubs and PySide6-stubs packages? HOT 6
- PySide6 bug HOT 2
- Update tests to be compatible with pytest 8.2
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 qtpy.