0

Consider this question on Stackoverflow:

How to show tooltip image when hover on button pyqt5?

According to the grammar in a Taiwanese textbook, after the word "when" comes 'verb+ing' (present progressive). "Hover" in the linked answer comes after "when", so the word 'hover' will become 'hovering'.

Which one is more elegant?

How to show tooltip image when hover on button pyqt5?

Or

How to show tooltip image when hovering on button pyqt5?

5
  • 2
    Similar question asked (and closed) on ELU. Commented Oct 29, 2022 at 16:28
  • 1
    Neither of these are properly formed questions. So, technically both are wrong.
    – Billy Kerr
    Commented Oct 30, 2022 at 0:32
  • I am sorry for everyone that the Similar question asked by my myself. But I don't know it delete immediately and no answer by web. So I post question here. Welcome everyone criticize me constructive. Thank you very much.
    – Good-boy
    Commented Oct 30, 2022 at 6:46
  • Just to note: You hover over a button, not on it. It's known technically as mouseover Commented Oct 30, 2022 at 8:13
  • Stack Overflow (see the last section), not Stackoverflow. Commented Nov 1, 2022 at 18:46

2 Answers 2

2

"When" gives the time or the condition for an event to occur. You can either use a participle

... when hovering ...

or you can use a simple present tense clause

... when someone hovers ...

(These are not the only possibilities, but this is enough)

1
  • A good answer for a learner. Right to the point.
    – Lambie
    Commented Nov 11, 2022 at 17:47
2

The linked question on Stack Overflow by user 4rigener starts with the sentence:

I want to show image when hover on button.

That sentence is grammatically incorrect, although a fluent speaker should be able to understand it. The same meaning could be conveyed more correctly by either of these sentences:

  • I want to show an image when hovering on a button using pyqt5.
  • I want to show an image when the user hovers on a button using pyqt5.

The second is in my view slightly better, because it makes explicit who does the hovering, but any programmer would understand this fully from the first version. Several other variations would also be possible.

Note that in addition to correcting the use of "hover", I added missing articles on "image" and "button". Nouns used in this way require an article to be grammatically correct, although the omission of such an article often leaves the sentence understandable, but not natural. Note also that my suggestions make clear the relation of "pyqt5" to the rest of the sentence.


By the way, such a text posted to one of the Stack Exchange sites is more usually called "a post" or more specifically "a question", not "an article". This is just a matter of local convention. On Wikipedia, for example, the term "article" is used for a main entry.

2
  • I am just imagining myself hovering on a button... I would rather try hovering my mouse pointer over one. Commented Oct 29, 2022 at 17:21
  • Stack Overflow and Stack Exchange (see the last section, "Proper Use of the Stack Exchange Name"), not StackOverflow and StackExchange. Commented Nov 1, 2022 at 18:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .