Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-15580

DockWidget's title not displayed correctly when using ampersand (&) in the DockWidget's title together with a DockWidget style sheet

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: P4: Low P4: Low
    • None
    • 4.7.0, 4.7.1
    • None
    • definitive on Windows, on Linux (Ubuntu64 10.10 with Qt 4.7.0) works fine

      On Windows, the windowTitle of a DockWidget with an ampersand (&) in the title (e.g. "Pan & Zoom") is not being displayed as expected. Without any stylesheet, the DockWidget shows "Pan & Zoom" in both cases, if docked or floating. As soon as a stylesheet containing a backgroud color definition for the dockwidget's title like

      QDockWidget::title

      {background-color: rgb(255, 0, 0) }

      the behavour changes. Now the dockwidget's title shows "Pan & Zoom" when floating and "Pan _Zoom" when docked. Looks like the ampersand is interpreted as hotkey indicator. This behavour can be observed in QtDesigner in the preview mode and is also present when rinning the compiled executable file.

      Qt 4.7.0 on Linux (Ubuntu64 10.10) behaves differently, it treats the ampersand always as hotkey indicator, regardless whether the DockWidget is floating or docked and whether it as a stylesheet or not. Here, the title has to be defined as "Pan && Zoom" for the resulting title to be displayed as "Pan & Zoom".

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Unassigned Unassigned
            edu@e-gits Eduardo Montesinos
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes