Windows11 native appearance question
-
Hi,
I'm having trouble understanding how to achieve a windows11 native look.
Its as though the app.setStyle('windows11') doesn't achieve a native windows 11 appearance.On the left is a windows native menu and on the right is a standard PySide6 menu which claims to have a native appearance but doesn't have a native appearance and seems to have a white transparent shadow added for some reason.
I don't believe I've seen dark menu's with white shadows like this anywhere in windows11 so I guess pyside is not detecting windows11 or something.Which setting will I have to enable to achieve a native appearance to windows11?
I seem to be the only person on the internet suffering from this issue and can't really find any information about it.
Any help would be appreciated. ThanksPySide 6.7.2
from PySide6.QtCore import * from PySide6.QtGui import * from PySide6.QtWidgets import * import sys class MainWindow(QMainWindow): def __init__(self): super().__init__() self.setWindowTitle("Window") self.setGeometry(100, 100, 800, 600) self.main_widget = QWidget() self.setCentralWidget(self.main_widget) self.init_ui() def init_ui(self): main_layout = QVBoxLayout() self.main_widget.setLayout(main_layout) # Create a simple menu bar with a File menu menubar = self.menuBar() file_menu = menubar.addMenu("File") open_action = QAction("Open", self) open_action.setShortcut("Ctrl+O") open_action.triggered.connect(self.open_file) file_menu.addAction(open_action) save_action = QAction("Save", self) save_action.setShortcut("Ctrl+S") save_action.triggered.connect(self.save_file) file_menu.addAction(save_action) exit_action = QAction("Exit", self) exit_action.setShortcut("Ctrl+Q") exit_action.triggered.connect(self.close) file_menu.addAction(exit_action) if __name__ == "__main__": app = QApplication(sys.argv) app.setStyle("windows11") window = MainWindow() window.show() sys.exit(app.exec())
-
I also have the same issue, and cannot find anyone else complaining. I don't have a solution for you though.
I recently transitioned from 6.6.1 to 6.7.2. And the "windows11" style in light mode looks hideous. There is less contrast throughout the application, making it difficult to navigate. Some bits are nice, but most are bad. The silver lining is that dark mode is better than the previous Fusion style, especially checkboxes. In light mode, I'm setting the style to "windowsvista" to achieve 6.6.1 look for now.