Display cursor on TextEdit box
-
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 -qwsI wish to see the cursor. But there is not cursor.
There is no physical mouse/keyboard attached to this board.Please help.
Thank you