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. QML and QWidgers performance
Forum Updated to NodeBB v4.3 + New Features

QML and QWidgers performance

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.1k 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.
  • C Offline
    C Offline
    Clint Westwood
    wrote on 28 Feb 2015, 12:37 last edited by
    #1

    Initially I've started building GUI for my desktop application using QT Quick QML. However later I had to switch to QWidgets because of performance issues.

    My goal was to replicate console terminal inside GUI. This console had to be able to process very large amount of data output per second.

    QML TextArea couldn't handle this task very well and froze GUI if there was too much data for it to handle. On the other hand, QPlaintextedit turned out to be much faster and being able to solve this problem without slowing down GUI at all.

    When I'm using widgets, all I have to do is to find a corresponding class to a particular widget, then find a pointer to my widget. From that point I have full access to my GUI elements from C++. In QML this task was a bit more compilcated. There is no C++ class like "QTextArea", so I have to use a base class like QObject for my pointer to TextArea. I wasn't able to find how to invoke some commands to TextArea like append() from C++, so first I had to call an additional function in QML from C++ that appends a new string.

    One last thing to mention is that TextArea doesn't seem to have property that would limit how much text it can hold, unlike QPlaintextedit.

    Have I done something wrong or indeed QPlaintextedit widget is better than QML TextArea in this particular case? What about performance of QWidgets vs QML in general?

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dheerendra
      Qt Champions 2022
      wrote on 28 Feb 2015, 16:19 last edited by
      #2

      I too had the similar experience with QML. When the lot of data is getting generated in C++ and need to be passed to QML, I had lot of issues. Finally I switched to Qt for doing this work. My feel is if you have huge to generated in C++ etc, better to work with Qt directly rather than QML.

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply
      2

      1/2

      28 Feb 2015, 12:37

      • Login

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