Results 1 to 5 of 5

Thread: How to add QTextEdit to QWizard

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2008
    Posts
    43
    Thanks
    14

    Question How to add QTextEdit to QWizard

    Hello,
    I would like to get some kind of hint as to how handle QWizard object in the programming. I had a need to use QTextEdit in a QWizardPage but QTextEdit is not supported by default there, only QLineEdit etc. The manual says I can add QTextEdit by, for example:

    Qt Code:
    1. ClassWizard::ClassWizard(QWidget *parent)
    2. : QWizard(parent)
    3. setDefaultProperty("QTextEdit", "toPlainText", "textChanged")
    4. .....
    To copy to clipboard, switch view to plain text mode 
    but that doesn't help and the
    Qt Code:
    1. registerField("text", textEdit)
    To copy to clipboard, switch view to plain text mode 
    still shows empty on
    Qt Code:
    1. QMessageBox (.....field("text").toString())
    To copy to clipboard, switch view to plain text mode 
    while the textBox is filled.
    -
    I have tryied:
    Qt Code:
    1. QVariant txt = textEdit->toPlainText();
    2. setField("text", txt);
    To copy to clipboard, switch view to plain text mode 
    but that still doesn not work and the field "text" stil empty.
    -
    Could you help me to find out how do I go about this to be able to use QTextEdit in QWizard pages?
    Last edited by jpn; 1st February 2008 at 10:03. Reason: missing [code] tags

Similar Threads

  1. QTextEdit slow to insert text
    By thomaspu in forum Qt Programming
    Replies: 4
    Last Post: 10th January 2008, 12:05
  2. QTextEdit, sizeHint, QWidget
    By TheKedge in forum Qt Programming
    Replies: 1
    Last Post: 3rd February 2007, 08:25
  3. QTextEdit API questions (plain text)
    By Gaspar in forum Qt Programming
    Replies: 4
    Last Post: 16th May 2006, 06:03
  4. Painting to QTextEdit
    By gesslar in forum Qt Programming
    Replies: 8
    Last Post: 18th February 2006, 18:40
  5. Obtaining clean (x)html from QTextEdit
    By ccf_h in forum Qt Programming
    Replies: 1
    Last Post: 5th February 2006, 14:47

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.