title: What is object index of QTextFormat?
body: <p>The function <strong>int QTextFormat::objectIndex () const</strong> returnes an object index. What is it? And what if I do the following:</p>
  
  <pre><code>    QTextBlockFormat bfmt;
      bfmt.setObjectIndex(0);
  </code></pre>
  
  <p>What this code does?</p>
  
  <p>ADDED:
  <a href="http://doc.trolltech.com/4.6/demos-textedit-textedit-cpp.html" rel="nofollow">Here</a> there is a function <strong>void TextEdit::textStyle(int styleIndex)</strong>. This function is for adding a list into QTextEdit, or making it a normal (standard text). In the function mentioned above there is a code snippet like this:</p>
  
  <pre><code> } else {
       // ####
       QTextBlockFormat bfmt;
       bfmt.setObjectIndex(-1);
       cursor.mergeBlockFormat(bfmt);
   }
  </code></pre>
  
  <p>This code snippet is in order to make list a standard text. But it does not work and only works when I write </p>
  
  <pre><code>    QTextBlockFormat bfmt;
      bfmt.setObjectIndex(0);
      m_textCursor.mergeBlockFormat(bfmt);
      m_textEdit-&gt;setTextCursor(m_textCursor);
  </code></pre>
  
  <p>Please explain me why?</p>