Skip to content

Conversation

hebasto
Copy link
Member

@hebasto hebasto commented Jun 8, 2020

After clicking on QLabel with selectable text the cursor remains forever:

47532924-65e7b200-d8ba-11e8-9254-7bde658961cb

This PR fixes this visual bug.

Earlier attempts to fix this issue:

@laanwj
Copy link
Member

laanwj commented Jun 9, 2020

Concept ACK, multiple cursors visible is wtf-level confusing.

Should this be reported as an upstream issue too?

Copy link
Contributor

@promag promag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK. Tested this approach and the one I'm suggesting. Does it make sense to have a dedicated label subclass?

@luke-jr
Copy link
Member

luke-jr commented Jun 11, 2020

This seems ugly. Ideally, if the focus returns to the label, the cursor position shouldn't be lost.

@hebasto
Copy link
Member Author

hebasto commented Jul 3, 2020

@laanwj

Should this be reported as an upstream issue too?

https://bugreports.qt.io/browse/QTBUG-59514

@hebasto
Copy link
Member Author

hebasto commented Jul 3, 2020

Updated 4b7c953 -> 5dbe2d6 (pr19210.01 -> pr19210.02, diff):

This also works

  • fixed context menu event handling

@hebasto
Copy link
Member Author

hebasto commented Jul 3, 2020

@promag

Does it make sense to have a dedicated label subclass?

I think, it does not required.

@luke-jr

This seems ugly. Ideally, if the focus returns to the label, the cursor position shouldn't be lost.

Unfortunately, the QLabel class has no property that holds the cursor position.

Copy link
Contributor

@promag promag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review ACK 5dbe2d6.

This change is a temporary fix of QTBUG-59514.
@hebasto
Copy link
Member Author

hebasto commented Jul 3, 2020

Updated 5dbe2d6 -> bd315eb (pr19210.02 -> pr19210.03, diff):

nit, move/copy this comment to class doc

@promag
Copy link
Contributor

promag commented Jul 6, 2020

Code review ACK bd315eb.

@fanquake
Copy link
Member

fanquake commented Jul 9, 2020

@laanwj can you take another look here? If you're happy with this change as-is, we can probably merge is here rather than punting to the GUI repo. We've now also got an upstream issue to refer too.

@laanwj
Copy link
Member

laanwj commented Jul 15, 2020

Tested ACK bd315eb

@laanwj laanwj merged commit d626a3b into bitcoin:master Jul 15, 2020
@hebasto hebasto deleted the 200608-cursor branch July 15, 2020 15:14
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jul 16, 2020
bd315eb qt: Get rid of cursor in out-of-focus labels (Hennadii Stepanov)

Pull request description:

  After clicking on `QLabel` with selectable text the cursor remains forever:

  ![47532924-65e7b200-d8ba-11e8-9254-7bde658961cb](https://user-images.githubusercontent.com/32963518/84038485-ad945200-a9a8-11ea-89e3-c7c17d02a611.png)

  This PR fixes this visual bug.

  Earlier attempts to fix this issue:
  - bitcoin#14577
  - bitcoin#14810 (combined with other UX feature)

ACKs for top commit:
  promag:
    Code review ACK bd315eb.
  laanwj:
    Tested ACK bd315eb

Tree-SHA512: 6bf89362412e5ce9a4dec6944b62fe44fc31ca49cda7f6e2eb37e847fac9dccb68bca7ac6877b19e42add2333e40d0b4265757ead105ac0a5d28f8ab43b322c3
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Sep 1, 2021
Summary:
This change is a temporary fix of QTBUG-59514.

This is a backport of [[bitcoin/bitcoin#19210 | core#19210]]

Test Plan:
`ninja all check-all`
`src/qt/bitcoin-qt`
I wasn't able to reproduce the bug, so I just checked that everything
still works as before. I suspect this only affects some versions of Qt.

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D10005
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Sep 21, 2021
bd315eb qt: Get rid of cursor in out-of-focus labels (Hennadii Stepanov)

Pull request description:

  After clicking on `QLabel` with selectable text the cursor remains forever:

  ![47532924-65e7b200-d8ba-11e8-9254-7bde658961cb](https://user-images.githubusercontent.com/32963518/84038485-ad945200-a9a8-11ea-89e3-c7c17d02a611.png)

  This PR fixes this visual bug.

  Earlier attempts to fix this issue:
  - bitcoin#14577
  - bitcoin#14810 (combined with other UX feature)

ACKs for top commit:
  promag:
    Code review ACK bd315eb.
  laanwj:
    Tested ACK bd315eb

Tree-SHA512: 6bf89362412e5ce9a4dec6944b62fe44fc31ca49cda7f6e2eb37e847fac9dccb68bca7ac6877b19e42add2333e40d0b4265757ead105ac0a5d28f8ab43b322c3
kwvg pushed a commit to kwvg/dash that referenced this pull request Oct 12, 2021
bd315eb qt: Get rid of cursor in out-of-focus labels (Hennadii Stepanov)

Pull request description:

  After clicking on `QLabel` with selectable text the cursor remains forever:

  ![47532924-65e7b200-d8ba-11e8-9254-7bde658961cb](https://user-images.githubusercontent.com/32963518/84038485-ad945200-a9a8-11ea-89e3-c7c17d02a611.png)

  This PR fixes this visual bug.

  Earlier attempts to fix this issue:
  - bitcoin#14577
  - bitcoin#14810 (combined with other UX feature)

ACKs for top commit:
  promag:
    Code review ACK bd315eb.
  laanwj:
    Tested ACK bd315eb

Tree-SHA512: 6bf89362412e5ce9a4dec6944b62fe44fc31ca49cda7f6e2eb37e847fac9dccb68bca7ac6877b19e42add2333e40d0b4265757ead105ac0a5d28f8ab43b322c3
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants