Qt 6 font descriptions not backward compatible with Qt 5.
Summary
Someone pointed out on Discord that Wireshark will use the mixed-width system font instead of a monospaced font after upgrading from Wireshark 4.0.0 to 4.0.1
Steps to reproduce
-
Install Wireshark 4.0.0.
-
Open Wireshark's
preferences
file in a text editor, find thegui.qt.font_name
, and keep the editor open. -
In your text editor, remove the
gui.qt.font_name
preference and save. -
Open Wireshark 4.0.0 and open the font preferences. The main window font should be set to a monospaced font, e.g. "Consolas 11.0" on Windows.
-
Hit "OK".
gui.qt.font_name
should be set to a 16-field font, e.g.Consolas,11,-1,5,400,0,0,0,0,0,0,0,0,0,0,1
.
At this point the packet list, packet detail, and byte view font should be normal (monospaced).
-
Quit Wireshark.
-
Install and run Wireshark 4.0.1.
At this point the packet list, packet detail, and byte view font should the mixed-width system font, e.g "MS Shell Dlg" on Windows. The gui.qt.font_name
preference should still be the 16-field set in 4.0.0, e.g. Consolas,11,-1,5,400,0,0,0,0,0,0,0,0,0,0,1
.
-
Quit Wireshark.
-
In your text editor, remove the
gui.qt.font_name
preference and save. -
Open Wireshark 4.0.1 and open the font preferences. The main window font should be set to a monospaced font, e.g. "Consolas 10.0".
-
Hit "OK".
gui.qt.font_name
should be set to a 10-field font, e.g.Consolas,10,-1,5,50,0,0,0,0,0
At this point the packet list, packet detail, and byte view font should be normal (monospaced).
What is the current bug behavior?
It looks like QFont::toString in Qt6 isn't compatible with QFont::fromString in Qt5.
What is the expected correct behavior?
We should be able to switch between Qt5 and Qt6 with impunity.
Build information
Tested using Wireshark 4.0.0 and 4.0.1 on Windows.