Results 1 to 10 of 10

Thread: Detecting a mouse press or click on QLineEdit set to Nofocus or .setReadOnly

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #10
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Detecting a mouse press or click on QLineEdit set to Nofocus or .setReadOnly

    gives an AttributeError: 'QLineEdit' object has no attribute 'globalPos'
    So you fire up your browser, type "Qt globalpos" into the Google search box, and what do you think you get as the first hit? Certainly faster than asking questions here and waiting for someone to answer.

    And since you already imported QTooltip from QtWidgets, you can probably remove the QtWidgets part of QtWidgets.QTooltip.showText and just use QTooltip.showText. I said I wasn't a Python expert. Also get rid of the separate import of all of QtWidgets. It just bogs things down at runtime.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  2. The following user says thank you to d_stranz for this useful post:

    dennisvz (28th August 2020)

Similar Threads

  1. Mouse press
    By User 23 in forum Qt Programming
    Replies: 1
    Last Post: 20th February 2016, 16:16
  2. Replies: 2
    Last Post: 16th July 2012, 12:40
  3. Replies: 1
    Last Post: 12th October 2010, 22:20
  4. Replies: 9
    Last Post: 26th October 2009, 00:13
  5. Detecting mouse clicks outside of widget
    By init2null in forum Qt Programming
    Replies: 2
    Last Post: 5th May 2006, 19:16

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.