Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. Windows11 native appearance question
Forum Updated to NodeBB v4.3 + New Features

Windows11 native appearance question

Scheduled Pinned Locked Moved Unsolved Qt 6
2 Posts 2 Posters 870 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    crza
    wrote on last edited by
    #1

    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. Thanks

    PySide 6.7.2

    a74e405e-cdf9-4e75-a391-e8e2c9a6e818-image.png

    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())
    
    
    1 Reply Last reply
    1
    • I Offline
      I Offline
      iaswtw
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved