Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Display cursor on TextEdit box

    Mobile and Embedded
    cursor qt4.8.5 textedit am335x
    1
    2
    1256
    Loading More Posts
    • 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.
    • V
      vk41286 last edited by

      Hi,

      I am using the AM335x Ti Embedded Hardware board. QT 4.8.5 is ported on to it already. All I want is to display the cursor on the Text edit box.

      Here is the code

      #include <QLabel>
      #include <QFont>
      #include <QtGui>
      #include <QPixmap>
      #include <QTextEdit>
      #include <QTextCursor>
      #include <QLineEdit>
      #include <QApplication>
      #include <QCoreApplication>
      #include <QPushButton>

      int main(int argc, char *argv[])
      {
      QApplication a(argc, argv);
      QTextEdit *editor = new QTextEdit();
      editor->setText("Welcome"); //Set the text inside textedit widget
      editor->setFocusPolicy(Qt::StrongFocus); //added for focus
      QTextCursor cursor(editor->textCursor());
      cursor.beginEditBlock();
      cursor.movePosition(QTextCursor::EndOfWord, QTextCursor::KeepAnchor);
      cursor.endEditBlock();
      editor->show();
      return a.exec();

      }

      I build this code on my host machine. The executable is created. I push this executable onto my board say /usr/

      I run this application in console :
      ./qtapp -qws

      I wish to see the cursor. But there is not cursor.
      There is no physical mouse/keyboard attached to this board.

      Please help.

      Thank you

      1 Reply Last reply Reply Quote 0
      • V
        vk41286 last edited by

        Its something completely custom. It does not have package manager.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post