Skip to content
  • qtCreator - debug python scripts?

    Unsolved Qt for Python qt for python
    2
    0 Votes
    2 Posts
    156 Views
    F
    See https://doc.qt.io/qtcreator/creator-python-development.html ; you need to create a Python project first.
  • 1 Votes
    4 Posts
    146 Views
    K
    Update on the Drag-and-Drop Issue: Root Cause Identified I've identified the bug: The issue is caused by running the application as Administrator, not by having Microsoft PowerToys FancyZones enabled. Thank you to everyone who provided feedback on this issue. After further investigation, I've determined that the primary cause of the drag-and-drop failure is running the PySide6 application with administrator privileges, not the presence of Microsoft PowerToys FancyZones. Root Cause Clarification Windows implements strict security isolation between processes running at different privilege levels. When a PySide6 application runs with administrator rights, it operates in a different security context than most desktop applications (including Windows Explorer, which typically runs at standard user level). This isolation prevents the cross-process communication necessary for drag-and-drop operations to function properly, resulting in the forbidden symbol (đźš«). Recommended Solution Run your PySide6 application at standard user privilege level (without administrator rights). This is the most straightforward solution and maintains normal drag-and-drop functionality. If your application genuinely requires elevated privileges for certain operations, consider: Implementing alternative file selection methods in your UI (e.g., QFileDialog for file opens, command-line argument support, or copy/paste path handling). Restructuring your application so that only the specific components needing elevated privileges run as administrator, while the main GUI runs at standard user level. Why FancyZones Might Have Seemed Related PowerToys FancyZones, which manages window layouts, might have interacted visibly with the window of an elevated application, potentially making the issue more noticeable. However, the core permission isolation issue lies with the administrator privilege level itself. Verification You can verify this by running the provided example code without administrator privileges. Drag-and-drop should function correctly, even with FancyZones enabled. Apologies for the initial confusion regarding FancyZones, and I hope this clarification helps others experiencing similar issues.
  • not able to get selection of pdf document

    Unsolved Qt for Python qt for python
    2
    0 Votes
    2 Posts
    1k Views
    F
    The QPdfView widget text selection functionality is currently not completely implemented or has bugs, see for example https://bugreports.qt.io/browse/QTBUG-131443 .
  • 0 Votes
    5 Posts
    538 Views
    transistxrT
    @friedemannkleint This did not work either, although I wasn't getting any errors as such
  • 0 Votes
    4 Posts
    669 Views
    SGaistS
    The chart example is an interesting starting point.
  • QSqlQueryModel.setQuery() won´t accept strg

    Solved Qt for Python qt for python pyside
    5
    0 Votes
    5 Posts
    810 Views
    S
    Solved: Missing parenthesis in self.mod_Indication = QtSql.QSqlQueryModel correct: self.mod_Indication = QtSql.QSqlQueryModel()
  • 0 Votes
    5 Posts
    779 Views
    G
    @SGaist Thanks for the suggestion! I’ll definitely try using commitDataRequest(). Just to clarify — will this method reliably block or cancel GUI-initiated shutdowns (like using the power-off button from GNOME or KDE) if I call manager.cancel() inside that slot? Also, does this approach still work reliably with modern session managers, given that some DEs (like GNOME) are moving away from traditional X11 session management? Are there any best practices for using commitDataRequest() together with D-Bus inhibitors or org.freedesktop.login1 to improve compatibility across desktop environments? Thanks again — I appreciate your insights!
  • 0 Votes
    3 Posts
    551 Views
    CristianMaureiraC
    Just to add to point 2. PyKDE seems to be very old and unmaintained. But, you can write KDE Apps with Python https://develop.kde.org/docs/getting-started/python/ (using Kirigami, like the C++ apps do)
  • 0 Votes
    2 Posts
    423 Views
    SGaistS
    Hi, Are you thinking about something like the Qt Graphs module ? The KDE project also has quite a lot of additional libraries.
  • 0 Votes
    2 Posts
    401 Views
    CristianMaureiraC
    Officials, no, but Community driven maybe. You can check the Qt Design Studio implementation though: https://code.qt.io/cgit/qt-creator/qt-creator.git/tree/?h=qds/dev
  • PyQt TableWidget abilities

    Unsolved Qt for Python qt for python python pyside pyside2
    3
    0 Votes
    3 Posts
    591 Views
    SGaistS
    Hi and welcome to devnet, What exactly are you after ? Did you already went through the documentation of the corresponding class ? Did you check the examples using it ?
  • Unable to make use of QBoundingVolume

    Unsolved Qt for Python pyside python qt for python
    1
    0 Votes
    1 Posts
    261 Views
    No one has replied
  • 0 Votes
    9 Posts
    1k Views
    F
    We actually provide a tool, pyside6-project , which defines a simple project file format and can do these steps automatically and can also be opened in Qt Creator.
  • 0 Votes
    4 Posts
    1k Views
    M
    Out of curiosity, have you tried building this with "pure" nuitka (not via pyside6-deploy)? I have completely given up on pyside6-deploy, but never really have any problems with nuitka for any platform.
  • PySide6 Unsupported keyword on Grid Layout

    Unsolved Qt for Python pyside qt for python python
    9
    0 Votes
    9 Posts
    2k Views
    JonBJ
    Well it's nice to know it's in good hands :)
  • Release a Qpdf without loading a new one

    Solved Qt for Python qt for python python pyside
    11
    0 Votes
    11 Posts
    2k Views
    A
    I've finally found the solution, it was indeed the eventloop. The process will only be destroyed after the next loop. match_manager.py # Mettre à jour les variables dans le fichier Excel ExcelToPdfWorker.update_variables(excel_path, variables) # Connecter le signal avant de décharger le PDF match_widget.editor.pdf_unloaded.connect( lambda: self._convert_after_unload(match_widget, excel_path) ) match_widget.editor.unload_pdf() def _convert_after_unload(self, match_widget, excel_path): """Appelé quand le PDF est vraiment déchargé.""" self.excel_worker.excel_path = excel_path self.excel_worker.convert() # Une fois la conversion terminée, on peut recharger le PDF match_widget.editor.load_new_pdf(match_widget.pdf_path) editor.py def unload_pdf(self): """Ferme le PDF actuel et nettoie les références.""" # Détacher la vue du document actuel self.pdfView.setDocument(None) # Fermer et supprimer l'ancien document if self.pdfDocument: old_document = self.pdfDocument # Créer un nouveau document vide avant de détruire l'ancien self.pdfDocument = QPdfDocument(self) # Connecter le signal destroyed à l'émission de notre signal old_document.destroyed.connect(self.pdf_unloaded.emit) old_document.close() old_document.deleteLater() def load_new_pdf(self, pdf_path): """Charge un nouveau fichier PDF.""" # Charger le nouveau PDF self.pdfDocument.load(pdf_path) self.pdfView.setDocument(self.pdfDocument) print(f"Nouveau PDF chargé: {pdf_path}") return True I'm well aware that my code sucks. Here's the solution. As deleteLater() really destroy the PdfDocument and unload it, you have to wait until the end of a complete cycle and return to app.exec(). Then I put in a signal that will convert the file once the reference has been destroyed, since we know that this frees access You should know that I think this is the only method without making temporary files
  • 0 Votes
    4 Posts
    1k Views
    JonBJ
    @GrecKo said in Is there any state management library for PySide project?: In your example, can both your views share a common model? Alternatively could you have two models sharing some common underlying data? @markleo Following up this suggestion from @GrecKo. If the models really share the same data you could have that as a single, source model and then impose separate proxy models on top of that for each distinct view. But that relies on a common, shared, base model, not suitable if the models are really quite distinct.
  • 0 Votes
    3 Posts
    578 Views
    Pl45m4P
    @markleo said in Apart from the modules provided by the official website, are there any other third - party Qt modules? If so, is there a central repository similar to npmjs.org?: third - party Qt modules What are third-party Qt modules?! Modules not made by Qt devs and published in the official Qt releases are not "Qt"... Since Qt is still just a C++ GUI framework and still not its own programming language like JavaScript, there are thousands of projects made by users/contributors on GitHub and similar sites, which work with or add something to Qt... custom widgets, functions or just code snippets... Edit: What @ChrisW67 is referring to is what I meant..."extensions" like QxORM can be integrated because of Qt's C++ API... but so does every C++ library work with your C++ project
  • ModernGL with QOpenGLWidget isn't rendering

    Solved Qt for Python qt for python
    6
    0 Votes
    6 Posts
    1k Views
    jsulmJ
    @ktechhydle If you enter "qt6 QWindow OpenGL" in Google first result is: https://doc.qt.io/qt-6/qtopengl-openglwindow-example.html
  • 0 Votes
    6 Posts
    2k Views
    SGaistS
    That's a question for the Qt Company and/or the module maintainers. This is a user forum. Note that writing bindings is a non trivial task depending on the underlying types and their lifetime management constraints.