Results 1 to 3 of 3

Thread: Is this bug or wrong code for PyQt4?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2014
    Posts
    2
    Qt products
    Platforms
    Windows

    Default Is this bug or wrong code for PyQt4?

    I use PyQt4-4.10.3 for a long time. Yesterday I've upgraded it to pyqt4-4.10.4. But I've found and interesting thing about unicode characters from that version. Here is my example code to explain the situation:

    Qt Code:
    1. #bla bla...
    2.  
    3. self.testtext = QLineEdit()
    4. self.testbutton = QPushButton("Press It")
    5. self.testbutton.pressed.connect(self.testit)
    6. self.grid.addWidget(self.testtext,0,0)
    7. self.grid.addWidget(self.testbutton,1,0)
    8. #...
    9. def testit(self):
    10. print (self.testtext.text())
    11.  
    12. #bla bla...
    To copy to clipboard, switch view to plain text mode 
    When I input "şşş" it prints the text "şşş" perfectly. But When I input "Müş", it prints "Mü_".
    I input "kır", it prints it correct. But when I input "çakır", it prints "çak1r".

    So;
    ÅŸÅŸÅŸ ---> ÅŸÅŸÅŸ
    Müş ---> Mü_
    kır ---> kır
    çakır --> çak1r

    It's so interesting and PyQt4-4.10.3 is NOT doing this.

    To sum up; i didn't get this bug when i was on previous PyQT version. The new version gives me this error. I use Python 3.3.5 and it's work with all unicode characters you know. But latest version of PyQt4 doesn't, I think. So what's your suggestions?

    Note: I removed 4.10.4 and installed 4.10.3 version. But I want to know what's wrong with 4.10.4?

    Thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Is this bug or wrong code for PyQt4?

    First make sure print() is not responsible to incorrectly displaying the text.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. What's wrong with my code?
    By Dave2011 in forum Newbie
    Replies: 4
    Last Post: 12th August 2011, 22:35
  2. What is wrong with this code?
    By Jeffb in forum Newbie
    Replies: 6
    Last Post: 18th February 2011, 07:35
  3. Replies: 6
    Last Post: 26th April 2010, 16:47
  4. What is wrong with my code?
    By Dante in forum Qt Programming
    Replies: 27
    Last Post: 6th April 2009, 07:56

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
  •  
Qt is a trademark of The Qt Company.