strange tool tip display

Discussion forum for C++ and script developers who are using the QCAD development platform or who are looking to contribute to QCAD (translations, documentation, etc).

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files, scripts and screenshots.

Post one question per topic.

Post Reply
User avatar
petevick
Premier Member
Posts: 392
Joined: Tue May 19, 2020 9:34 am
Location: North Norfolk coast UK

strange tool tip display

Post by petevick » Fri Mar 12, 2021 5:44 pm

I've noticed a weird anomaly with the display of tool tips on the Options toolbar for PolyLineBreakSymbol, It only occurs with the themes I've done that have applied any kind of style to QToolTip{}, and it seems to only affect check boxes and labels. Typically, there is just three lines in the QToolTip{} section, as an example...

Code: Select all

QToolTip {
    background-color: #f9f1eb;
    color: #633a1d;
    border: 1px solid #b36832;
}
I've tested each line on it's own, but still get the same result.
This is a label tool tip...
notoktt.png
notoktt.png (9.96 KiB) Viewed 5934 times
...notice how the border ends are inboard of the background, and the additional space around the text. Same occurs with the check box
This is the spin box tool tip next to the label...
oktt.png
oktt.png (10.64 KiB) Viewed 5934 times
...this is what the tooltips usually look like, and that is the same text, cut & pasted. The radio button tool tips display as expected. I've checked, double and triple checked, and there's nothing I can see that might be causing it.
Even with the QToolTip{} section removed, there is additional space at the ends of the tool tips for check boxes and labels, these are the same tool tips with no QToolTip{} in the theme....
Label tool tip
nocodenotok.png
nocodenotok.png (9.63 KiB) Viewed 5934 times
Spin box tool tip
nocodeok.png
nocodeok.png (10.41 KiB) Viewed 5934 times
I can't even find another tool that displays a check box or label that also has a tool tip for comparison.
Could there be anything in Qcad that is influencing this behaviour, or might it simply be a QT bug :?:

Pete
Pete Vickerstaff
Linux Mint 21.2 Cinnamon, Qcad Pro 3.29.6

User avatar
petevick
Premier Member
Posts: 392
Joined: Tue May 19, 2020 9:34 am
Location: North Norfolk coast UK

Re: strange tool tip display

Post by petevick » Fri Mar 12, 2021 6:11 pm

I have now found another tool that displays a check box with tool tip on the Options toolbar, and the tool tip displays the same incorrect behaviour as above.
Last edited by petevick on Mon Mar 15, 2021 8:34 am, edited 1 time in total.
Pete Vickerstaff
Linux Mint 21.2 Cinnamon, Qcad Pro 3.29.6

User avatar
petevick
Premier Member
Posts: 392
Joined: Tue May 19, 2020 9:34 am
Location: North Norfolk coast UK

Re: strange tool tip display

Post by petevick » Sat Mar 13, 2021 9:23 am

And I'm pretty sure it's not OS related, it's the same behaviour in Windows (running in Linux Wine)

And the tool tips display correctly in the preview mode of QT Designer
Pete Vickerstaff
Linux Mint 21.2 Cinnamon, Qcad Pro 3.29.6

User avatar
petevick
Premier Member
Posts: 392
Joined: Tue May 19, 2020 9:34 am
Location: North Norfolk coast UK

Re: strange tool tip display

Post by petevick » Mon Mar 15, 2021 8:36 am

It's definitely confined to the Options toolbar, other checkbox tool tips in dialog boxes display correctly
Pete Vickerstaff
Linux Mint 21.2 Cinnamon, Qcad Pro 3.29.6

User avatar
andrew
Site Admin
Posts: 9037
Joined: Fri Mar 30, 2007 6:07 am

Re: strange tool tip display

Post by andrew » Mon Mar 15, 2021 9:13 am

This would be Qt's doing, so you might have to look into possible workarounds rather than trying to fix things on your end.

Note that Qt renders widgets and tooltips without using system widgets as soon as styles are involved, so it should look the same on all platforms.

User avatar
petevick
Premier Member
Posts: 392
Joined: Tue May 19, 2020 9:34 am
Location: North Norfolk coast UK

Re: strange tool tip display

Post by petevick » Mon Mar 15, 2021 9:22 am

andrew wrote:
Mon Mar 15, 2021 9:13 am
This would be Qt's doing, so you might have to look into possible workarounds rather than trying to fix things on your end.

Note that Qt renders widgets and tooltips without using system widgets as soon as styles are involved, so it should look the same on all platforms.
Thanks for the reply Andrew. I've been looking at workarounds, and the best I can come up with is to just delete the styling for tooltips! Even applying negative margins/padding has no effect on them, but it does elsewhere. I could apply just to the affected tooltips, but it starts getting messy for something relatively unimportant.

Note that this also affects the system Dark theme as there is styling applied in the stylesheet.css 'fix' (not applied by me). But I don't think it's a real issue. Pale yellow tooltips in that theme would look out of place and awful.

Pete
Pete Vickerstaff
Linux Mint 21.2 Cinnamon, Qcad Pro 3.29.6

Post Reply

Return to “QCAD Programming, Script Programming and Contributing”