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. Issue with QTextBrowser not redrawing after append until the widget is resized
Forum Updated to NodeBB v4.3 + New Features

Issue with QTextBrowser not redrawing after append until the widget is resized

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 346 Views 2 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.
  • R Offline
    R Offline
    rustymbk1079
    wrote on last edited by
    #1

    Apologies if this is discussed elsewhere.
    Was part of a bigger application that I had just started writing but simplified it right back.

    Form with a push button and a textbrowser.

    Button appends text via signal/slot to textbrowser.
    Text is not visible until I resize the window.

    If I make the signal slot a Queued connection then it displays the text immediately.

    This is compiled on 5.12.8

    Problem on Mac OSX10.14.6 but behaves fine on OSX 10.13 without the queued connection.
    Advice welcome.

    PS the timer printing to the debugger is so I could check the event loop is running - which it is.

    Code that has odd behaviour on MAC OSX 10.14 :

    #include "mainwindow.h"
    #include "ui_mainwindow.h"
    #include <QDateTime>
    #include <QDebug>

    MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
    {
    ui->setupUi(this);
    connect(ui->pushButton, &QPushButton::clicked, this, &MainWindow::something);
    t.setInterval(1000);
    t.start();
    connect(&t, &QTimer::timeout, this, this {
    qDebug()<<tCount++;
    });
    }

    MainWindow::~MainWindow()
    {
    delete ui;
    }

    void MainWindow::something() {
    ui->textBrowser->append(QDateTime::currentDateTime().toString());
    }

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Did you check whether you have the same issue with a more recent version of Qt ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • R Offline
        R Offline
        rustymbk1079
        wrote on last edited by
        #3

        Thank you for the reply. It seems that if compiled with an SDK before 10.14 then this is an issue on any 10.14 machines running the app. If compiled with SDK pre 10.14 and run on pre 10.14 OSX then all is fine. If compiled using 10.14 SDK then runs fine on all OSX. I was just hoping to keep support for OSX 10.11 which I cannot do if I move to QT5.12 and SDK 10.14

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          There's one phrase that is a bit contradictory, once you say that with the 10.14 SDK, it fails on macOS 10.14 and in another that it runs well everywhere.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          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