IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Qt Discussion :

QTextEdit edt fichier type rtf


Sujet :

Qt

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre éprouvé Avatar de uriotcea
    Homme Profil pro
    Ingénieur / physicien
    Inscrit en
    Septembre 2003
    Messages
    1 301
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur / physicien
    Secteur : Service public

    Informations forums :
    Inscription : Septembre 2003
    Messages : 1 301
    Par défaut QTextEdit edt fichier type rtf
    Bonjour,

    Je cherche à charger dans un QTextEdit un fichier au format rtf comme ca.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
     
        QFile file(my_fichier.rtf);
        if (file.open(QFile::ReadOnly | QFile::Text)) {
          Editor->setPlainText(file.readAll());
        }
    J'ai mis 'acceptRichText' à true mais j'obtient ca
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
     
    \cf1\b\i\f0\par
    11-03\cf0 -2008 \b0\i0 : \cf3\b New: \cf0\b0  A new command, SET_BEAM_PHASE_ERROR has been added (See Help File) .(Giulia Bellodi, CERN)\par
    \cf1\b\i\par
    11-03\cf0 -2008 \b0\i0 : \cf3\b New: \cf0\b0  A new command, TWOTERMS, allows to select the longitudianl profil in RFQ (See Help file).\par
    \cf1\b\i\par
    14-02\cf0 -2008 \b0\i0 : \cf2\b Fixed Bug\cf0\b0 , the NCELLS element didn't work in Partran when these optional parameters was not set. (Giulia Bellodi, CERN)\f1\par
    \cf1\b\i\f0\par
    13-02\cf0 -2008 \b0\i0 : \cf3\b New: \cf0\b0  In multiparticle box, the number of space-charge calculation per meter or beta_Lambda has been added, previously it was beta_Lambda divided by 2, but in few case that was too low. The command
    Quelles options ai-je oublié
    Merci d'avance

  2. #2
    Membre Expert

    Avatar de IrmatDen
    Profil pro
    Inscrit en
    Novembre 2006
    Messages
    1 727
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2006
    Messages : 1 727
    Par défaut
    Salut,

    Citation Envoyé par doc de QTextEdit::acceptRichText
    acceptRichText : bool

    This property holds whether the text edit accepts rich text insertions by the user.
    Donc de toute évidence, ça n'a strictement aucun impact.

    Reste insert* et set*, mais ça ne s'applique qu'au texte pur, ou au html. Ne te reste plus qu'une option: convertir du format RTF au format HTML.

  3. #3
    Membre éprouvé Avatar de uriotcea
    Homme Profil pro
    Ingénieur / physicien
    Inscrit en
    Septembre 2003
    Messages
    1 301
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur / physicien
    Secteur : Service public

    Informations forums :
    Inscription : Septembre 2003
    Messages : 1 301
    Par défaut
    Oui, je pourrais essayer ca, mais reconnait que c'est pas trés satisfaisant.

  4. #4
    Membre Expert

    Avatar de IrmatDen
    Profil pro
    Inscrit en
    Novembre 2006
    Messages
    1 727
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2006
    Messages : 1 727
    Par défaut
    Non, mais reconnaît que du RTF ce n'est ni du plain text, ni de l'html

Discussions similaires

  1. Verouillage et test fichier type texte
    Par jmjmjm dans le forum Linux
    Réponses: 3
    Dernier message: 15/01/2007, 18h11
  2. Indexation de fichiers .doc, .rtf, .PDF
    Par carmelaurel dans le forum Langage
    Réponses: 3
    Dernier message: 29/09/2006, 18h46
  3. Image et Fichier type record
    Par aliwassem dans le forum Langage
    Réponses: 6
    Dernier message: 22/01/2006, 15h23
  4. Fichier type Record et ListView
    Par aliwassem dans le forum Langage
    Réponses: 4
    Dernier message: 01/12/2005, 15h30
  5. [LG]fichier typé; record et pointeurs
    Par rigel dans le forum Langage
    Réponses: 6
    Dernier message: 12/05/2004, 16h12

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo