rpi5/Trixie and many PyQt6 messages about QPalette

  • rdtsc
  • rdtsc's Avatar Topic Author
  • Away
  • Senior Member
  • Senior Member
More
03 Apr 2026 00:43 #345089 by rdtsc
Hi, on my rpi5/7c80 with Debian Trixie, PyQt6 apps like to display weird QPalette messages like this:
...
hm2/hm2_7c80.0:     IO Pin 049 (P1-17/DB25-09): IOPort
hm2/hm2_7c80.0:     IO Pin 050 (P1-19/DB25-10): IOPort
hm2/hm2_7c80.0:     IO Pin 051 (P1-21/DB25-11): Encoder #1, pin A (Input)
hm2/hm2_7c80.0:     IO Pin 052 (P1-23/DB25-12): Encoder #1, pin B (Input)
hm2/hm2_7c80.0:     IO Pin 053 (P1-25/DB25-13): Encoder #1, pin Index (Input)
hm2/hm2_7c80.0: registered
Found file(REL): ./vc-p2s.hal
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette) const QPlatformTheme::SystemPalette
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette) const QPlatformTheme::ToolButtonPalette
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette) const QPlatformTheme::ButtonPalette
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette) const QPlatformTheme::CheckBoxPalette
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette) const QPlatformTheme::RadioButtonPalette
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette) const QPlatformTheme::HeaderPalette
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette) const QPlatformTheme::ItemViewPalette
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette) const QPlatformTheme::MessageBoxLabelPelette
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette) const QPlatformTheme::TabBarPalette
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette) const QPlatformTheme::LabelPalette
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette) const QPlatformTheme::GroupBoxPalette
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette) const QPlatformTheme::MenuPalette
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette) const QPlatformTheme::MenuBarPalette
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette) const QPlatformTheme::TextEditPalette
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette) const QPlatformTheme::TextEditPalette
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette) const QPlatformTheme::TextLineEditPalette
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette) const QPlatformTheme::ToolTipPalette
virtual QVariant Qt6CTPlatformTheme::themeHint(QPlatformTheme::ThemeHint) const
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette) const QPlatformTheme::SystemPalette
Shutting down and cleaning up LinuxCNC...
task: 948 cycles, min=0.000004, max=0.012919, avg=0.009934, 0 latency excursions (> 10x expected cycle time of 0.010000s)
hm2: unloading
Note: Using POSIX realtime
mycnc@mycnc:~ $ 

This does not happen at all for PyQt5 apps - specifically only PyQt6.  While not a problem per se, I looked for a way to eliminate these messages.  From what little I could gather, it has to do with Qt6 platform theme.  Perhaps it is not installed correctly or is missing a component, as this doesn't happen for at least one other rpi5/Trixie user.  Anyways, a work-around was to add the following environment variable to the end of ~/.bashrc:
# okay weird one here... this squelches 17 QPalette messages from PyQt6 apps...
export QT_QPA_PLATFORMTHEME='kde **.**'

You can then either restart or issue a  source ~/.bashrc  in the terminal to reload that.  Apparently this may make PyQt6 apps appear a little differently (more like the kde theme?)  I haven't noticed a difference but haven't looked too hard.  But more importantly, it removed all of those notices about QPalette.

There is likely some other, better method for actually fixing the issue, whatever that may be... but this does the trick for now. :)

Please Log in or Create an account to join the conversation.

Time to create page: 0.077 seconds
Powered by Kunena Forum