Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How conver RTF to HTML
Forum Updated to NodeBB v4.3 + New Features

How conver RTF to HTML

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 602 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mikeeeeee
    wrote on last edited by
    #1

    Hi!
    How conver RTF to HTML?

    K 1 Reply Last reply
    0
    • M Mikeeeeee

      Hi!
      How conver RTF to HTML?

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      @Mikeeeeee

      How about http://doc.qt.io/qt-5/richtext.html and http://doc.qt.io/qt-5/qtextdocument.html#toHtml

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      3
      • M Offline
        M Offline
        Mikeeeeee
        wrote on last edited by Mikeeeeee
        #3

        Maybe you can get an example based on this code:

        QString file = QFileDialog::getOpenFileName(0, "Document RTF, "", "*.rtf");
            if(!file.isEmpty())
            {
                QFile sFile(file);
                if(sFile.open(QFile::ReadOnly | QFile::Text)){
                    QTextStream in(&sFile);
                    QString text = in.readAll();
                    sFile.close();
        
                    //QTextDocument textDocument;
        
                    ui->ResumeHHTextEdit->setHtml(text);
                    qDebug()<<text;
                }
            }
        
        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved