oclero/qlementine

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

Opened this issue · 1 comments

The sandbox example crashes 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("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

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