0

I'm checking if it would be possible to implement a GUI using HTML through PyQT and WebKit. One of the problem is that using the mouse you can select the text making up the interface. Can this behaviour be disabled?

Also, the mouse pointer changes to an insertion caret while over the selectable text. I would like to disable this, without disabling the hand mouse pointer which appears when over a clickable link.

Meh
  • 7,016
  • 10
  • 53
  • 76
  • PyQT shouldn't (and can't as far as I know) be use for designing a web interface. – Jason Coon Feb 11 '10 at 13:26
  • I am not designing a web interface. It's a stand alone application, but instead of doing it's GUI using panels, and labels end edit boxes, I just generate a HTML page containing links and fields and forms and display that. When you click a link, an event fires inside my app code. – Meh Feb 12 '10 at 00:09

2 Answers2

2

That's how I am doing it:

cursor: default;
-webkit-user-select: none;

I am working on something quite similar, a desktop app with html/css-based interface. The above code takes care of text selection and the caret. Set css property cursor to pointer for your links, something like:

a { cursor: pointer; }
slacktracer
  • 6,262
  • 6
  • 28
  • 33
1

You can use javascript to "return false" on the start selection event in order to disable the text selection.

gozman
  • 11
  • 1