Skip to content
  • 144k Topics
    722k Posts
    Christian EhrlicherC
    @DmitryTS said in UB or not: a constant reference extend the life of this temporary object or not? I already answered it...
  • Jobs, project showcases, announcements - anything that isn't directly development
    4k 23k
    4k Topics
    23k Posts
    RokeJulianLockhartR
    @jselbie, I presume it's not anymore, since the apparent WinUI rewrite? (If not, did you transfer to the new FluentWinUI3 QQuickStyle?)
  • Everything related to designing and design tools

    127 382
    127 Topics
    382 Posts
    R
    I see this is an old thread and I see several unresolved threads on this topic. I'm leaving this incase it helps someone else who ends up here. The solution was twofold for me. Go to File > Export Project and select Enable Python Generator. This will create a main.py. Make sure you pip install PySide6-DS Hope this helps someone.
  • Everything related to the QA Tools

    77 213
    77 Topics
    213 Posts
    J
    Hello i am using WinCC OA to develop a qt application. WinCC OA has some custom elements which cannot be detected by squish for example a polygon. Squish is now not able to detect this element with the picker. I know the name of the element but as it is of WinCC OA internal i do not know the type: waitForObject( {"container": "container", "name": "POLYGON1","type": "???","visible": 1} ); How do i get this information? And what to use if unknown? Is there any other way? I mainly just need to click this element. Thanks a lot
  • Everything related to learning Qt.

    380 2k
    380 Topics
    2k Posts
    V
    Re: Introducing the QML for Beginners Learning Path & Challenges! Code [image: 0bdec0b3-391b-4146-9139-915587ee26a1.jpg] [image: 5bc25cde-14cc-49b3-bfea-bef4606e6a33.jpg]
  • 2k Topics
    13k Posts
    JonBJ
    @swankster , @ankou29666 I smacked together the following to test with a database backend: int main(int argc, char *argv[]) { QApplication a(argc, argv); QTableView w; QFile::remove("sqlitedb.db"); QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE"); db.setHostName("localhost"); db.setDatabaseName("sqlitedb.db"); bool ok = db.open(); Q_ASSERT(ok); QSqlTableModel myModel(nullptr, db); QSqlQuery q; ok = q.prepare("CREATE TABLE t1(row INT, col0 INT, col1 INT, col2 INT, col3 INT, col4 INT, col5 INT, col6 INT, col7 INT, col8 INT, col9 INT)"); if (!ok) qDebug() << q.lastError().driverText() << q.lastError().databaseText(); ok = q.exec(); if (!ok) qDebug() << q.lastError().driverText() << q.lastError().databaseText(); for (int row = 0; row < 56000; row++) { ok = q.prepare("INSERT INTO t1 VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"); if (!ok) qDebug() << q.lastError().driverText() << q.lastError().databaseText(); q.bindValue(0, row); for (int col = 1; col <= 10; col++) q.bindValue(col, col); ok = q.exec(); if (!ok) qDebug() << q.lastError().driverText() << q.lastError().databaseText(); } myModel.setTable("t1"); myModel.select(); qDebug() << myModel.rowCount(); w.setModel(&myModel); w.show(); return a.exec(); } I admit I am using SQLite rather than MySQL, because I can't be bothered to figure out my MySQL. It takes quite a while to insert all the rows, but thereafter the scrolling is regular, fast and smooth. (About 1,000 rows every 2 seconds with my finger on Page Down key on the table view, which I suspect is down to the key auto-repeat rate rather than fetching/displaying rows, and certainly fast enough for the user.) Note that the initial qDebug() << myModel.rowCount(); does indeed print 256 as I suggested would be the case. The Qt SQL code fetches "buffers" of 256 rows at a time. If/when you want more you have to call fetchMore(). The QTableView is doing this internally in response to the scrolling whenever it reaches the end of the latest buffer. There might be a tiny pause each time, though too fast to tell. And once fully populated I can scroll up & down freely. YMMV. MySQL will certainly require a cross-process access compared against SQLite's direct file access. And if your MySQL database/server is on another machine that will be an overhead. Why don't you start by seeing how this performs for you? The only thing I can think of which could cause a "delay/lag" is when the view needs to request the next 256 rows from the db. This would occur during table view scrolling. But it should not become any progressively worse as more records have ben read. You can do all the fetchMore() calls yourself in advance (while (canFetchMore()) fetchMore();) to fully populate the model before displaying the view. From that you should see how much delay they cause on their own and you can see the view's behaviour when there is no database access going on. Over to you, @swankster ! I really don't know exactly what you are doing or what your situation is. My own finding/belief is that it should work as shown in your situation without excessive lag and without all your pre-processing shenanigans.
  • 4k Topics
    18k Posts
    SGaistS
    @Christian-Ehrlicher moved !
  • This is where all the posts related to the Qt web services go. Including severe sillyness.
    1k 10k
    1k Topics
    10k Posts
    SGaistS
    @RokeJulianLockhart to the best of my knowledge, no. The first release of Discourse was in 2014 and the forum is several years older than that.