Bug 416574 - Caret is in the wrong position relative to text in Qscintilla boxes
Summary: Caret is in the wrong position relative to text in Qscintilla boxes
Status: RESOLVED WORKSFORME
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: 5.17.5
Platform: Manjaro Linux
: NOR normal
Target Milestone: 1.0
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-22 12:29 UTC by isaac.o.braham
Modified: 2021-04-09 04:33 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Qscintilla widget with misplaced caret (6.50 KB, image/png)
2020-01-22 12:29 UTC, isaac.o.braham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description isaac.o.braham 2020-01-22 12:29:20 UTC
Created attachment 125297 [details]
Qscintilla widget with misplaced caret

SUMMARY

In certain types of Qscintilla text boxes (I haven't been able to establish which yet), the caret is in the wrong place relative to the text (see attached screenshot).

The location is exactly where it should be if the text had no kerning - ie the caret assumes no kerning, but the text is kerned.

I've tried different fonts, turning kerning on/off in Qt designer, changing the system font, all to no effect.

Others have reported that the issue does not occur in other DEs on the same platforms (Manjaro Gnome and Manjaro Xcfe have been tried), so it's something to do with the way KDE renders these particular boxes.

STEPS TO REPRODUCE
1. Open a QgsExpressionBuilderWidget - The easiest way to do this is through Qgis (mapping software) which uses the widget. a) Open Qgis b) Add a scratch layer c) go to properties>manage fields>field calculator

2. Type in a string of letters ('w' works well)



OBSERVED RESULT

The caret is someway away from the actual letters

EXPECTED RESULT

The caret should follow the letters


SOFTWARE/OS VERSIONS

Linux/KDE Plasma: 4.19.97-1-MANJARO x86_64
(available in About System)
KDE Plasma Version: KDE Plasma 5.17.5
KDE Frameworks Version: 
Qt Version: 5.14.0

ADDITIONAL INFORMATION
Comment 1 David Edmundson 2020-01-22 12:37:21 UTC
please run Qscintilla --style fusion and report if it still appears
Comment 2 isaac.o.braham 2020-01-22 14:16:09 UTC
(In reply to David Edmundson from comment #1)
> please run Qscintilla --style fusion and report if it still appears

I don't actually have Qscintilla on my machine (other than calling it in python, so I can't run it directly I'm afraid.

If I make a Qscintilla text box like

```
import sys
from PyQt5.QtWidgets import QApplication
from PyQt5.Qsci import QsciScintilla


if __name__ == "__main__":
    app = QApplication(sys.argv)
    editor = QsciScintilla()
    editor.show()
    editor.setText('this is a test')
    app.exec_()
```
The caret works perfectly, so it's something in that particular widget that's not interacting well with Plasma.

I forgot to add that this type of widget always used to work. It's only stopped working since my last upgrade which was to KDE 5.17.5 and QT 5.14.0
Comment 3 Bug Janitor Service 2020-02-06 04:33:19 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Christoph Feck 2020-02-13 14:29:32 UTC
I fail to see the issue in the screenshot. The caret is exactly between two 'w' characters. Could you please show the expected screenshot for comparison?
Comment 5 Bug Janitor Service 2020-02-28 04:33:12 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 6 Bug Janitor Service 2020-03-14 04:33:13 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!
Comment 7 isaac.o.braham 2020-04-15 17:33:22 UTC
(In reply to Christoph Feck from comment #4)
> I fail to see the issue in the screenshot. The caret is exactly between two
> 'w' characters. Could you please show the expected screenshot for comparison?

Sorry, I thought I'd been clearer in my write-up. That's where the caret is when I finish typing the line of 'w's.I've not moved it with the cursor or anything. Similarly, if I type a line of small letters (kerning-wise) like 'I's, the caret ends up far in front of the letters.

I don't understand why this issue is now closed. I've given all the info I've been asked for (that it's possible for me to give).

It seems a bit harsh to give KDE users no recourse to have bugs investigated unless they're technically proficient enough to run application-building software without instruction.

I'd be grateful if someone could re-open this and look into it, or give me some further instruction as to how I can help.
Comment 8 Nate Graham 2021-03-10 22:26:56 UTC
You can set temporarily set the Application Style to Fusion in System Settings > Appearance > Application Style, then try your python script again. Does it still happen?
Comment 9 Bug Janitor Service 2021-03-25 04:33:54 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 10 Bug Janitor Service 2021-04-09 04:33:41 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!