oclero / qlementine

⚠️🏗️ [WORK IN PROGRESS] 🍊Modern QStyle for desktop Qt6 applications.
https://oclero.github.io/qlementine/
MIT License
73 stars 16 forks source link

Crash when changing application style from qlementine to a non-qlementine style #45

Open IoeCmcomc opened 11 months ago

IoeCmcomc commented 11 months ago

The sandbox example crashes when the application style changes from QlementineStyleto a non-qlementine style (e.g. fusionor 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("fusion");
  3. Uncomment the following line in SanboxWindow.cpp: _impl->setupUI_lineEdit();
  4. Compile and run the sandbox
  5. The application crashes

The app seems to crash when there is a QLineEdit. The crash doesn't occur with other non-qlementine widgets, but visual glitches appear (I'll report that later).

Debug information:

OS: Windows 11 23H2 Toolkit: Qt 5.15.2 MSVC2019 32-bit (compiler error with MinGW) Compile mode: Debug Crash location: EventFilters.cpp, line 65 in method oclero::qlementine::LineEditButtonEventFilter::eventFilter

oclero commented 11 months ago

Thank you! Probably some event filter that still have a ref to QlementineStyle, or something like this.