Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Closed due to no activity
Forum Updated to NodeBB v4.3 + New Features

Closed due to no activity

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 603 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.
  • I Offline
    I Offline
    iamk2
    wrote on last edited by
    #1

    The following code compiles and runs within the QTC IDE but does not clear screen.
    @#include <iostream>
    #include "term.h"
    #include "unistd.h"
    #include "ncurses.h"

    using namespace std;

    void Clear_Screen(bool RESET= true);

    int main()
    {
    Clear_Screen();
    cout << "Hello World!" << endl;
    Clear_Screen();
    cout << "Hello Again!" << endl;
    return 0;
    }

    void Clear_Screen(bool RESET)
    {
    if (!cur_term)
    {
    int result;
    setupterm(NULL,STDOUT_FILENO,&result);
    if (result <=0) return;
    }
    putp(tigetstr("clear"));
    if (RESET == true)
    putp(tigetstr( "rs1"));
    } @

    After compile then run from inside QTC gives
    @Hello World!
    Hello Again!@

    When run straight from XTerm result is
    @Hello Again!@

    debug shows result with value -1. Does this mean that tty is not set by xterm from within QTC?

    Just guessing?????

    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