Results 1 to 7 of 7

Thread: UTF-8 Issues in Sample

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #7
    Join Date
    May 2011
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question Re: UTF-8 Issues in Sample

    Hello,

    I'm desperate and after 2 weeks looking for I've come here. I think I have a similar problem with the setHtml function. However I'm programming with python and Plasma:


    class crearWidgetApplet(plasmascript.Applet):
    def __init__(self,parent,args=None):
    plasmascript.Applet.__init__(self,parent)

    def init(self):
    self.setHasConfigurationInterface(False)
    self.theme = Plasma.Svg(self)
    self.theme.setImagePath("widgets/translucentbackground")
    self.setBackgroundHints(Plasma.Applet.DefaultBackg round)
    self.setAspectRatioMode(Plasma.IgnoreAspectRatio)
    self.layout = QGraphicsLinearLayout(Qt.Horizontal, self.applet)
    self.resize(697, 763)

    url = "http://www.eltiempo.es/"
    html = Browser().open(url).read()
    webView = Plasma.WebView(self.applet)
    webView.setHtml(html)


    self.layout.addItem(webView)
    self.setLayout(self.layout)


    Please, I appreciate some type of help. The especial characters ('ñ' 'º' 'á' 'é' ª ...) don't show correctly when I use the setHml function. However if I write the setUrl function the webpage shows correctly. I have tried to save the html content in a file.html and I can visualize well with a browser (firefox, chrome...). Furthermore, I tried the setUrl function with a file///directory/code.html argument and it works too.

    I need the setHtml code because I have to modify the code before showing it.
    I read about "Adding an explicit style to the string being passed in solved the problem" but I dont understand what I have to do (english isn't my first language).

    Thank You for reading and please, heeeeelp!!
    Last edited by gosku; 19th May 2011 at 01:52.

Similar Threads

  1. how to write a sample application using QT on windows mobile
    By pallavi Boyapat in forum Qt Programming
    Replies: 0
    Last Post: 4th November 2008, 06:10
  2. how to write hello world sample QT application on windows mobile
    By pallavi Boyapat in forum Qt Programming
    Replies: 8
    Last Post: 3rd November 2008, 12:06
  3. Any issues with Qt 4.3.x and Mac Xcode 3.0?
    By will49 in forum Qt Programming
    Replies: 0
    Last Post: 7th March 2008, 16:30
  4. Issues updating to QMdiArea
    By fnmblot in forum Qt Programming
    Replies: 9
    Last Post: 17th December 2007, 18:37
  5. MySql plugin driver issues
    By stevey in forum Installation and Deployment
    Replies: 11
    Last Post: 20th September 2006, 13:45

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.