Results 1 to 3 of 3

Thread: [PyQt4] check if value of QLabel changed

  1. #1
    Join Date
    Apr 2014
    Posts
    2
    Qt products
    Platforms
    Unix/X11 Windows

    Question [PyQt4] check if value of QLabel changed

    I Need to check if the value (str) of a qlabel changed.
    I think about using the following code (nearly the same as used by a spinbox widget in PyQt):

    Qt Code:
    1. self.connect(self.ui.labelEntry, QtCore.SIGNAL("valueChanged(str)"), self.autovalidate)
    To copy to clipboard, switch view to plain text mode 

    What's the correct Methode to check if value changed?

    All the best;

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: [PyQt4] check if value of QLabel changed

    QLabel doesn't have a change signal for its text property.

    Cheers,
    _

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: [PyQt4] check if value of QLabel changed

    The only way that the label text can change is if your program code changes it, so there is little point in the label separately announcing that it changed.

Similar Threads

  1. Replies: 8
    Last Post: 30th September 2014, 11:00
  2. Replies: 0
    Last Post: 5th August 2012, 02:03
  3. [PyQt4] PyQt4 + gcin issue
    By fieliapm in forum Installation and Deployment
    Replies: 0
    Last Post: 28th September 2010, 09:04
  4. Replies: 1
    Last Post: 29th September 2009, 20:44
  5. Replies: 1
    Last Post: 2nd August 2008, 16:46

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.