Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual glitches when changing application style from qlementine to a non-qlementine style #46

Open
IoeCmcomc opened this issue Dec 14, 2023 · 1 comment
Milestone

Comments

@IoeCmcomc
Copy link

Visual glitches appear in the sandbox example when the application style changes from QlementineStyle to a non-qlementine style (e.g. fusion or windowsvista) after the main window (SandboxWindow) is created.

How to reproduce:

  1. In main.cpp file, comment out window->setCustomStyle(style);
  2. In main.cpp file, put the following code after main window creation:
qApplication.setStyle("windowsvista"); // or qApplication.setStyle("fusion");
qApplication.setPalette(qApplication.style()->standardPalette()); // Force new style palette
  1. Replace commented lines in the SandboxWindow constructor with the following code in SanboxWindow.cpp:
_impl->setupUI_button();
_impl->setupUI_buttonVariants();
_impl->setupUI_checkbox();
_impl->setupUI_radioButton();
_impl->setupUI_commandLinkButton();
_impl->setupUI_sliderAndProgressBar();
_impl->setupUI_spinBox();
_impl->setupUI_comboBox();
_impl->setupUI_toolButton();
_impl->setupUI_groupBox();
  1. Compile and run the sandbox
  2. Observe the issue

With fusion style

  • Current behavior:
    2023-12-14 223359
  • Expected behavior:
    2023-12-14 223240

With windowsvista style

  • Current behavior:
    2023-12-14 223436
  • Expected behavior:
    2023-12-14 223202

Note: Visual glitches don't occur when switching between fusion, Windows and windowsvista styles.

Debug information:

OS: Windows 11 23H2
Toolkit: Qt 5.15.2 MSVC2019 32-bit
Compile mode: Debug

@oclero
Copy link
Owner

oclero commented Dec 16, 2023

Thank you. I haven't tried to switch between styles, so wasn't aware of this bug. I'll take a look when I have time

@oclero oclero added this to the 1.2.0 milestone Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants