Results 1 to 2 of 2

Thread: QTextEdit and toHtml()

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2010
    Posts
    96
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    4
    Thanked 5 Times in 5 Posts

    Default QTextEdit and toHtml()

    Can I prevent Qt (PyQt4) from forcing it's HTML style onto my QTextEdit's .toHtml() statement? I am trying to make a WYSIWYG Editor and at this point I have to decide what I which direction I am going to take.

    QTextEdit offers really nice functionality, especially since I can gain access to the position of the selected text. This can allow me to bold / unbold text. Being that I am a new I am sure I could be more efficient. I am currently just formulating a process to build on.

    QWebView looks like it would offer a lot, but my problem with QWebView is the lack of access to the mouse's position in it's own Widget. How was this not implemented? .textCursor() and .position() QWebView does not have .textCursor().

    So right now I am looking for direction. If I can find how to prevent QTextEdit from implementing it's awful .toHtml() syntax all over the place ... or if I could discover how to find the position of my selected text in QWebView I could move on. Anyone that can help?

  2. #2
    Join Date
    Feb 2010
    Posts
    96
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    4
    Thanked 5 Times in 5 Posts

    Default Re: QTextEdit and toHtml()

    I have a decision I am running with. It is really draconian, guerilla, outdated ... but I am going to go with it. I have a feeling I should be look at QWebView and it's DOM features ... but no where for the life of me can I find it. WebKit would be awesome if I could just extract the element and it's text from my selection. WYSIWYG editors would be a simple tag change then.

Similar Threads

  1. QTextEdit
    By ocean in forum Qt Programming
    Replies: 4
    Last Post: 13th September 2008, 13:19
  2. Replies: 1
    Last Post: 16th February 2007, 08:22
  3. QTextEdit::toHtml()
    By lewis in forum Qt Programming
    Replies: 3
    Last Post: 20th July 2006, 15:31
  4. QTextEdit help pls
    By munna in forum Newbie
    Replies: 2
    Last Post: 29th April 2006, 10:07
  5. 4.1 to 4.1.1, qtextedit
    By jey in forum Qt Programming
    Replies: 5
    Last Post: 9th March 2006, 13:48

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.