Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User dileeh's Avatar
    Join Date
    Jun 2007
    Posts
    11
    Hi,

    I added a QTextEdit widget in read only mode as shown below, if i set the alignemt right able to add the data from the right, i tried modifying that to Qt::AlignBottom which was not working as expected. Please provide me the solution how to add the data from bottom right of QTextEdit and append the data from bottom?. means i need to scroll the data from bottom up.

    log = new QTextEdit();
    log->setReadOnly(true);
    log->setAlignment(Qt::AlignRight);
    log->setText("check");

    Thanks
    Madhu.

  2. #2
    Nokia Developer Expert Fuzzbender's Avatar
    Join Date
    Feb 2008
    Posts
    183
    Hi,

    As you can see from documentation of QTextEdit (http://doc.trolltech.com/4.5/qtexted...l#setAlignment) bottom alignment for this widget is not
    supported.

    As you are already working with read only text, could you try to work with QLabel?
    E.g.
    QLabel *label = new QLabel(this);
    label->setFrameStyle(QFrame::Panel | QFrame::Sunken);
    label->setText("first line\nsecond line");
    label->setAlignment(Qt::AlignBottom | Qt::AlignRight);

    Cheers,
    FB

  3. #3
    Registered User dileeh's Avatar
    Join Date
    Jun 2007
    Posts
    11
    Hi FB,

    But QLabel doesn't have the method append(), i want to append the lines to QTextEdit from bottom to top. Please let me know any other widget is having both the features append and alignment to bottom right?.

    Thanks
    Madhu.

  4. #4
    Nokia Developer Champion james1980's Avatar
    Join Date
    Sep 2007
    Location
    Bhavnagar
    Posts
    919
    Hi Dileeh,

    I think you can use a combiation of a Qstring and a label. As you told in your last post you need append functionality you can use string and than later on you can display it on label.

    Hope this helps you.

    Regards.
    Jajal Mehul

  5. #5
    Regular Contributor mind_freak's Avatar
    Join Date
    Jan 2009
    Location
    ભારત->ગુજરાત->ભાવનગર
    Posts
    273
    Hi Dileeh,

    I think the the james1980 is right but if you want to try something apart of this,then you can go for QLineEdit here also you can set the alingment to right and can add the data from rightside of QLineEdit.

    Hope this helps you

    Regards
    Viral Parmar

Similar Threads

  1. Data Call on Nokia 6600 (ETel/RCall) problem
    By NSDev in forum Symbian C++
    Replies: 9
    Last Post: 2010-06-10, 12:39
  2. help~~~about the CMdaAudioInputStream
    By Dragon_L in forum Symbian Media (Closed)
    Replies: 14
    Last Post: 2008-11-05, 06:11
  3. Replies: 3
    Last Post: 2008-09-09, 04:53
  4. Replies: 1
    Last Post: 2007-04-17, 10:47
  5. 6600 gprs 发送大量rtp延时问题
    By dicson_hu in forum Symbian
    Replies: 9
    Last Post: 2005-11-04, 02:12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved