Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt Android. Reading text from a file.
Forum Updated to NodeBB v4.3 + New Features

Qt Android. Reading text from a file.

Scheduled Pinned Locked Moved Solved Mobile and Embedded
1 Posts 1 Posters 588 Views 1 Watching
  • 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.
  • K Offline
    K Offline
    Kandid
    wrote on last edited by Kandid
    #1

    I'm trying to organize in the android application display a some text file of the .txt or .htm format. In Windows everything is fine, but in android is not correctly displayed. And how I can fix scrollbars in application?
    UPD: I solved this problem when I added Windows-1251 (for Russian text).

    QTextStream stream(&file);
    stream.setCodec("Windows-1251"); //I miss this
    QString buffer = stream.readAll();
    topic->Set_Text_label_topic(ui->topic_1->text(), buffer);
    file.flush();
    file.close();
    

    alt text

    alt text

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved