Conversation
Introduce a new QSLLabelDialog to print/save QSL labels and integrate it into the UI.
- Added ui/QSLLabelDialog.{cpp,h,ui}: full-featured dialog with preview, presets (Avery/etc.), printer selection, sheet/single label layouts, PDF export, automatic page-size detection (Qt>=5.13), grouping of QSOs, marking contacts as QSL Sent, and settings persistence.
- Updated QLog.pro: added printsupport module and included the new source, header and form files.
- Integrated dialog into LogbookWidget: added actionPrintQSLLabel to the context menu, hooked up slot printQSLLabel(), and implemented selection -> dialog flow.
- Integrated dialog into MainWindow: added action and showPrintQSLLabels() to launch the dialog for queued ('Q') contacts.
- Use dialog->open() (window-modal) instead of exec() to avoid nested Cocoa run loops / macOS printing crashes.
These changes enable printing QSL labels from selected contacts or all queued contacts and persist user preferences for future use.
Remove grid from the printed "73 de" footer and preview line, and update single-label printing to use the printer's actual printable area (setFullPage(false)) to avoid bottom cut-off on small-label printers. Adjust renderLabel/printSingle to use the printable page rect when rendering. Large .ui changes: modernize enum/property names (scoped enums), set default tab index, add decimals properties to many QDoubleSpinBoxes, update default double values, add tooltips, refine widget alignments and preview geometry, and simplify some UI comments/ordering. In RotatorWidget, add validation for NaN/inf azimuth inputs with qWarning() and early return to avoid using invalid values.
Introduce MAX_QSOS_PER_LABEL and always reserve a fixed number of QSO rows so font sizing is computed consistently across labels. Move makeFont helper up, render a fixed number of data rows (with empty rows left blank) and apply alternating row shading to all rows. Also tweak text formatting ("To Radio" label, datetime and band/mode spacing) and refactor per-column cell rendering for clarity.
Add /build to .gitignore and remove several inline comments that referenced a macOS 26 / PrintingUI crash workaround in LogbookWidget, MainWindow, and QSLLabelDialog. No functional code changes were made; only comments were removed to clean up outdated explanations.
|
Unfortunately, we both did the same thing. I have a similar solution in the upcoming 0.50. I will try to use some of your things there, but probably not until 0.51. |
|
Ok do you want me to leave this here or just revisit it after 0.50? I'm pretty flexible on implementation so nothing here I am set on except wanting it to be slightly flexible on types of labels/printers. Other applications I've tried printing labels with it is very limiting on the printers or have to jump through so many hoops it makes it not worth the effort. I look forward to seeing what you got. Just had me thinking about QSL processing I got a big stack (for me) of cards from the Buro so was trying to make it easy to process them both in and handle replies. |
|
Please leave it open here. I've already taken some parts |
|
BTW, you can test it - branch |
|
I like the way you laid it all out and preview and all. One issue I have is with MacOS and QT there is an issue with going through the QPrintDialog. The only way I could get it to work is to print directly to the printer. That's why I had the printer combobox and did it that way. With your code the PDF works great but when I hit print it just crashes. BTW I like the way you added the debug logging in the Help Menu. |
|
I'm not a MacOS specialist, but according to the coredump it crashed somewhere deep in the MacOS library. It went through the QT library. is it possible to try to find what is wrong? Did you have the same experience with QPrintDialog or am I doing something wrong? If it doesn't work, we'll have to make different version for MacOS (where the printer will be in the selection) and another dialog version for the rest, where QPrintDialog will be used. |
|
I had the same problem. I can look at it some more tonight but I could only get it to work by not using that. Doesn’t make sense really to me but I got tired of fighting it.
… On Apr 9, 2026, at 10:27 AM, Ladislav ***@***.***> wrote:
foldynl
left a comment
(foldynl/QLog#993)
<#993 (comment)>
I'm not a MacOS specialist, but according to the coredump it crashed somewhere deep in the MacOS library. It went through the QT library. is it possible to try to find what is wrong?
39 QtPrintSupport 0x101ddae80 QPrintDialogPrivate::openCocoaPrintPanel(Qt::WindowModality) + 540
40 QtPrintSupport 0x101ddb444 QPrintDialog::exec() + 76
Did you have the same experience with QPrintDialog or am I doing something wrong? If it doesn't work, we'll have to make different version for MacOS (where the printer will be in the selection) and another dialog version for the rest, where QPrintDialog will be used.
—
Reply to this email directly, view it on GitHub <#993 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AUEEMXU64RTR7G7B6KY36JT4U66NPAVCNFSM6AAAAACXQKCBNWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DEMJVGQZDIMBWG4>.
You are receiving this because you authored the thread.
|
|
In a quick test this seems to work. It's a simple solution that works - no crash and printed. I would need to test with my printer and label printer at home. |
|
Ok it worked good with sheets of labels. It didn't with my label printer but that's not a big deal to me - for it to work would need custom paper size I think. The way it is now is great. Not sure it is worth that effort. But this change I put above prompts to select a printer then sends it no problem. |
|
I’m sorry, but does “this seems to work” mean that it no longer crashes with your patch ? |
|
I tried recompiling it on a colleague's Mac with MacOS26.4 and there the printer dialog appears correctly without any issue or crash without our patch. There is something strange about it. please, could you test following patch ? |
|
With this patch it still crashes when I hit print. The code I attached above it does print to the print successfully with no crashes. Sorry for the poor choice of words but the only reason I said seems to work is I just printed to plain paper. I didn't test with a sheet of labels. Is your colleagues Mac a silicon based Mac? In my limited research it seems that may the cause of the crash, may even depend on the version. Mine is a M4. |
|
It is a M4 with 26.4. That doesn't make sense to me. I'll try to do some more tests on Monday. |
|
devel_0.50 - crashes Apple M1 Max Sequoia 15.5 (24F74) |
|
thank @kyleboyle @aa5sh : Which version of Qt are you using? |
|
Could you please also test whether Qt Creator crashes when you use “Print Document”? Because the only difference is that QPrinter is passed as a pointer to a dynamically allocated object in QT Creator. In QLog, it is passed as a pointer to a statically allocated object, which might play a role. Could I ask you to test whether replacing it with Please, do not call any deallocation. Just new and no delete. like this: |
|
I was testing it from within QT Creator. If I change nothing and just run the build from finder it doesn’t crash. This is so aggravating with this happening. It works fine with your base code in devel-0.50 if I run the build outside of QT Creator.
… On Apr 11, 2026, at 2:01 AM, Ladislav ***@***.***> wrote:
foldynl
left a comment
(foldynl/QLog#993)
<#993 (comment)>
Could you please also test whether Qt Creator crashes when you use “Print Document”? Because the only difference is that QPrinter is passed as a pointer to a dynamically allocated object in QT Creator. In QLog, it is passed as a pointer to a statically allocated object, which might play a role.
Could I ask you to test whether replacing it with
QPrinter *printer = new QPrinter(QPrinter::HighResolution);
and then passing the printer pointer improves the situation?
—
Reply to this email directly, view it on GitHub <#993 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AUEEMXRIUUA5TSGUASI74N34VHUVLAVCNFSM6AAAAACXQKCBNWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DEMRYGM4DSMRYGA>.
You are receiving this because you were mentioned.
|
|
I probably expressed myself poorly, but your finding is interesting as well. Otherwise, I meant whether you are able to run a print of some short text(source code) from Qt Creator. Just QTCreator uses dynamic allocation for QPrinter class. |
|
I can confirm that running outside of qt creator does NOT crash on the head of the devel branch |
|
and are you able to print from qr creator? for example a short source code? I want to find out why it crashes. And qt creator prints the same way as qlog with only one small difference |
|
Ok if I just try to print some source code from QT Creator the dialog opens fine no crash. I changed that line *printer and QLog still crashes if launched from QT Creator. |
Same here |
|
thank you, unfortunately it still doesn't make sense to me. @aa5sh Michael, what version of QT are you using? |
|
I think 6.11 - whichever the default home-brew loads now.
… On Apr 11, 2026, at 10:02 AM, Ladislav ***@***.***> wrote:
foldynl
left a comment
(foldynl/QLog#993)
<#993 (comment)>
thank you, unfortunately it still doesn't make sense to me. @aa5sh <https://github.com/aa5sh> Michael, what version of QT are you using?
—
Reply to this email directly, view it on GitHub <#993 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AUEEMXQDHWOYXA257UZN2YT4VJM7HAVCNFSM6AAAAACXQKCBNWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DEMRZGYZTGMBUGY>.
You are receiving this because you were mentioned.
|
|
Alright, it seems I’m currently unable to understand the issue causing the crash. I will implement what Michael suggested. Thanks for testing. |
The issue was that launching QPrintDialog caused the application to crash on macOS. This problem is observed only on macOS; on other operating systems, this workaround is not present and the native QPrintDialog is used. The workaround adds the option to select a printer directly within the dialog, thereby avoiding the need to invoke QPrintDialog. See more details #993.
|
BTW, should be fixed in devel_0.50. |
|
I don’t think you need to implement the change. The only use case it is needed is if QLog is launched from within QT Creator on MacOS so very limited at this point most likely me and Kyle. Sorry there is a lot of confusion about this. But in default runtime situation the original code worked without issue.
I think the test with print source code from QTCreator just validates it is good at runtime, since it itself isn’t running from a test state from the IDE. Not sure how to say that to make sense.
But for typical usage the original code you had was good. I would suggest reverting this change.
… On Apr 12, 2026, at 4:30 AM, Ladislav ***@***.***> wrote:
foldynl
left a comment
(foldynl/QLog#993)
<#993 (comment)>
BTW, should be fixed in devel_0.50.
—
Reply to this email directly, view it on GitHub <#993 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AUEEMXRSJVW6R6GSUNSGRJD4VNO3NAVCNFSM6AAAAACXQKCBNWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DEMZRGIYTENRWGA>.
You are receiving this because you were mentioned.
|
|
Just to be sure: remove commit cef33e1 and leave it as it is? |
|
Yes remove it so like it was Friday.
… On Apr 12, 2026, at 7:13 AM, Ladislav ***@***.***> wrote:
foldynl
left a comment
(foldynl/QLog#993)
<#993 (comment)>
Just to be sure: remove commit cef33e1 <cef33e1> and leave it as it is?
—
Reply to this email directly, view it on GitHub <#993 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AUEEMXRHME4EQPZUSSOW4R34VOB5RAVCNFSM6AAAAACXQKCBNWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DEMZRGQ3TSNRTHA>.
You are receiving this because you were mentioned.
|
|
It just surprises me a bit because @kyleboyle reported that all my patches crash. |
|
I was running everything from qt creator debug. My experience is the same as Michael's, sorry for the confusion. |

Adds a new Print QSL Labels dialog (QSLLabelDialog) accessible from the logbook and main menu, allowing operators to print physical QSL confirmation labels directly from the contact queue.
Features
Two print modes:
Flexible content options — each section independently toggleable: DX callsign header, date/time, band/mode, RST, frequency, name/QTH, and operator "73 de" footer
QSO grouping — optionally groups multiple QSOs to the same callsign onto one label; groups larger than 7 QSOs split across multiple labels automatically
Multi-QSO table layout — grouped labels show a fixed-size table (sized for 6 rows) with column headers (Date/Time, Band/Mode, RST, Freq) so font size stays consistent across 2–6 QSOs, with blank rows filling unused space
Live preview — renders a scaled preview of the label in the dialog as settings change
PDF export — saves labels to PDF in addition to direct printing
Mark as sent — optionally marks printed contacts as QSL Sent (Y) after printing
Settings persistence — all layout and content preferences are saved and restored between sessions