Skip to content
  • 0 Votes
    2 Posts
    20 Views
    SGaistS

    Hi,

    As silly as it may sound: why not start from a fresh transform ?

  • 1 Votes
    6 Posts
    81 Views
    MesterPerfectM

    @SGaist said in Accessibility Issue with Radio Buttons in PyQt6 Setting:

    Testing with PySide6 allows to check whether it's a binding specific or a possibly Qt specific issue.
    As for whether the PyQt folks work on this, you should as Riverbank Computing as they are the authors of that binding.

    Hi,

    I tested the same example using PySide6, and unfortunately, the focus issue remains the same. When navigating to the group of radio buttons, the screen reader still places its focus on the first button in the group instead of the selected option.

    This confirms that the problem is not specific to PyQt6 but seems to be a broader issue with how focus is handled in such scenarios.

    Looking forward to any suggestions or insights you might have.

    Thank you!

    import sys from PySide6.QtCore import Qt from PySide6.QtGui import QPalette, QColor from PySide6.QtWidgets import QApplication, QMainWindow, QVBoxLayout, QRadioButton, QPushButton, QWidget, QButtonGroup class MainWindow(QMainWindow): def __init__(self): super().__init__() # Set dark theme self.set_dark_theme() # Create layout and central widget layout = QVBoxLayout() # Add example buttons before the radio buttons button1 = QPushButton("Button 1") button2 = QPushButton("Button 2") layout.addWidget(button1) layout.addWidget(button2) # Create radio buttons self.radio_enable = QRadioButton("Enable") self.radio_disable = QRadioButton("Disable") self.radio_default = QRadioButton("Default") # Set the "Default" option selected by default self.radio_default.setChecked(True) # Group the radio buttons for accessibility self.radio_group = QButtonGroup() self.radio_group.addButton(self.radio_enable) self.radio_group.addButton(self.radio_disable) self.radio_group.addButton(self.radio_default) # Add radio buttons to the layout layout.addWidget(self.radio_enable) layout.addWidget(self.radio_disable) layout.addWidget(self.radio_default) # Set the central widget and layout container = QWidget() container.setLayout(layout) self.setCentralWidget(container) self.setWindowTitle("PySide6 Accessibility Example") def set_dark_theme(self): palette = QPalette() palette.setColor(QPalette.ColorRole.Window, QColor(53, 53, 53)) palette.setColor(QPalette.ColorRole.WindowText, Qt.GlobalColor.white) palette.setColor(QPalette.ColorRole.Base, QColor(35, 35, 35)) palette.setColor(QPalette.ColorRole.AlternateBase, QColor(53, 53, 53)) palette.setColor(QPalette.ColorRole.ToolTipBase, Qt.GlobalColor.white) palette.setColor(QPalette.ColorRole.ToolTipText, Qt.GlobalColor.white) palette.setColor(QPalette.ColorRole.Text, Qt.GlobalColor.white) palette.setColor(QPalette.ColorRole.Button, QColor(53, 53, 53)) palette.setColor(QPalette.ColorRole.ButtonText, Qt.GlobalColor.white) palette.setColor(QPalette.ColorRole.BrightText, Qt.GlobalColor.red) palette.setColor(QPalette.ColorRole.Link, QColor(42, 130, 218)) palette.setColor(QPalette.ColorRole.Highlight, QColor(42, 130, 218)) palette.setColor(QPalette.ColorRole.HighlightedText, Qt.GlobalColor.black) self.setPalette(palette) app = QApplication(sys.argv) window = MainWindow() window.show() sys.exit(app.exec())
  • 0 Votes
    3 Posts
    78 Views
    JonBJ

    @markleo
    For IPC you have shared memory, TCP sockets, named pipes, for parent/child processes stdin/stdout, or specifically Qt Remote Objects. All available from Qt and Python.

  • 1 Votes
    5 Posts
    123 Views
    P

    It looks exactly like the bug reported there and it says it was fixed.
    I think we are ok to use Pyside6 without the addons for now. Everything works and I do not think we are missing any functionality. I reported it here as it looks like a bug and I thought it should have been reported and addressed in the future releases of PySide.
    Using option A is not an option for us. we have an old pipeline with hundreds of .ui files dynamically loaded all over the place. It is also a very convenient way to build interfaces and I'm not sure why anyone would want to add an extra step and generate the python classes manually.

  • 0 Votes
    1 Posts
    40 Views
    No one has replied
  • 0 Votes
    1 Posts
    43 Views
    No one has replied
  • 0 Votes
    2 Posts
    76 Views
    JonBJ

    @markleo
    https://qfluentwidgets.com/pages/designer/
    I cannot imagine that Qt Designer would document, explain or tutorial on that third-party app, it would be up to the third-party to do so, as per the link.

  • 0 Votes
    5 Posts
    253 Views
    M

    I fond it by :

    % find /opt/anaconda3/ -name "Designer.app"
    /opt/anaconda3//pkgs/qt6-main-6.7.3-h2fbab7f_1/lib/qt6/bin/Designer.app

  • 0 Votes
    3 Posts
    129 Views
    JonBJ

    @markleo
    As @Pl45m4 has said. PyQt and PySide are so similar that there is no reason why you should not create a PySide project and then just substitute PyQt for PySide everywhere it occurs. Plus project templates are really only a couple of files and lines of code, once you've seen one you are not missing out if you just write/copy in the few lines.

  • 0 Votes
    3 Posts
    107 Views
    B

    Hi and thanks for your welcome.
    Good question, I'm trying to create Qt bindings for Ada language.
    Some attempts with C++ were failing due to some C++ subtleties.
    But Python provides C API which I can used easily with Ada.
    I provide some very first Qt bindings for Ada.
    But class inheritance is still in Python.
    I wanted to make them full Ada. I'm able to instantiate a class inherited from QRasterWindow (for instance) but a call to the method metric (for instance) provoques a seg fault.
    (for simplicity I post the code in C)

  • 0 Votes
    2 Posts
    100 Views
    SGaistS

    Hi,

    It seems you would need an item on top of your images that you would paint transparently and then use something like QPainterPath to create the shape for your selection. The QGraphicsPathItem might be enough for your needs.

    Hope it helps

  • 0 Votes
    1 Posts
    75 Views
    No one has replied
  • 0 Votes
    3 Posts
    176 Views
    SGaistS

    Hi,

    One strange thing is that the error shown is invalid Python. As @JonB suggested, check the exact difference between the two files. Especially if you set this property.

  • Enabling macOS Wallpaper Tinting

    Unsolved Qt for Python
    1
    0 Votes
    1 Posts
    91 Views
    No one has replied
  • 0 Votes
    9 Posts
    296 Views
    JonBJ

    @Rangerguy128
    As @Christian-Ehrlicher says we don't know what "normal" size means to you. If you mean you have an original image file with a certain size picture in it and you don't want the user to resize it bigger than this you could set the maximum size to the original size. You were asking about resizing originally, now you don't want it to resize, resizing when small but not too large, what precisely do you want or not want?

  • 0 Votes
    6 Posts
    244 Views
    SGaistS

    I think that at some point you have just the right amount of tabs which does not necessitate their use. Or are you just at the limit of that ?

  • 0 Votes
    1 Posts
    66 Views
    No one has replied
  • 0 Votes
    12 Posts
    501 Views
    D

    @JonB thank you!
    Sometimes it happens that everything gets mixed up in my head: Python, PyQt... and I'm no longer sure if I can do something straightforward. I'll try to call the method directly

  • 0 Votes
    4 Posts
    170 Views
    jsulmJ

    Maybe you need to break the layout first?