Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.5k Posts
  • Qcompleter Rules

    Unsolved
    4
    0 Votes
    4 Posts
    221 Views
    Pl45m4P
    @Carlosyoot said in Qcompleter Rules: I create two columns that turn into one item, and I just return part of that item? No, just a model where you have two columns in each row (data entry). One for your description like Samsung S21 and one for your "code" or whatever data behind that, like 00001. Then you create a simple delegate for that model to display the column of data you need from the model and set that delegate to your view.
  • Corrupted menu?

    Unsolved
    2
    0 Votes
    2 Posts
    149 Views
    Pl45m4P
    @Carlosyoot You probably set a stylesheet somewhere that turned the background of some base class black. What is your OS and Qt version?
  • QTimer slot not getting called correctly....

    Moved Unsolved
    5
    0 Votes
    5 Posts
    349 Views
    J
    @Christian-Ehrlicher said in QTimer slot not getting called correctly....: Why? I would guess this will take quite some time... That code was from one of the previous employees, I tried to optimize this with QgsRubberband and doing setToGeometry() for the rubberband
  • I can't build any version of qt because of assimp

    Unsolved
    12
    0 Votes
    12 Posts
    745 Views
    A
    @JonB For the record, I download the last Qt6 environment and I compiled the Qt6 source code without any problem. Thanks for the support.
  • mysql driver on macos sequoia

    Solved
    7
    0 Votes
    7 Posts
    458 Views
    L
    Macmini with M4 (apple silicon)
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    15 Views
    No one has replied
  • Odd behaviors when submitting rows with NOT NULL constraints

    Unsolved
    5
    0 Votes
    5 Posts
    314 Views
    M
    Well, I hope this time it is ok for you: #include <QApplication> #include <QSqlTableModel> #include <QSqlQuery> #include <QSqlDatabase> #include <QSqlError> #include <QMainWindow> #include <QTableView> #include <QStyledItemDelegate> int main(int argc, char *argv[]) { QApplication a(argc, argv); QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE"); db.open(); QSqlQuery query(db); query.exec("CREATE TABLE bouquets (variant TEXT NOT NULL, name TEXT NOT NULL, capacity INT NOT NULL, PRIMARY KEY (name));"); query.exec("INSERT INTO bouquets (variant, name, capacity) VALUES ('A', 'foo', 10);"); QMainWindow window; QSqlTableModel *model; model = new QSqlTableModel(&window, db); model->setTable("bouquets"); model->setEditStrategy(QSqlTableModel::OnRowChange); model->select(); QTableView tableView; window.setCentralWidget(&tableView); tableView.setModel(model); tableView.setItemDelegate(new QStyledItemDelegate(&tableView)); QObject::connect(model, &QSqlTableModel::beforeInsert, [=](QSqlRecord &record) { switch (model->lastError().type()) { case QSqlError::ConnectionError: qWarning() << "Insert connection error" << model->lastError().text(); break; case QSqlError::StatementError: qWarning() << "Insert statement error" << model->lastError().text(); break; case QSqlError::TransactionError: qWarning() << "Insert transaction error" << model->lastError().text(); break; default: break; } }); model->insertRow(model->rowCount()); QModelIndex index = model->index(model->rowCount() - 1, 0); tableView.setCurrentIndex(index); tableView.edit(index); window.show(); return a.exec(); } I write again the steps: fill only the "variant" column, press enter and change row check the (correct) error about the missing "bouquets.name" field is fired come back to the row, check again the same error is firing (just because we changed the row, ok) fill the "name" column and press enter The error is fired again! But we set the column to a value different than NULL. No error should be fired. Now if you still edit the same column and press again enter it will change (correctly) to the next missing column. fill the "capacity" column and press enter. The row is submitted but: a) it should not since we didn't change the row b) a wrong error ("NOT NULL constraint failed: bouquets.capacity Unable to fetch row") is fired: it makes no sense since the field was set and the row correctly submitted
  • QThreadPool not always emitting (custom) finished signal

    Unsolved qthreadpool signal & slot
    5
    0 Votes
    5 Posts
    527 Views
    J
    I came across QtConcurrent and QFutureWatcher only after I started down this path, and I was rather hoping to see if I can figure out why this isn't working before completely abandoning in favour of that approach. Realistically I can see situations where both approaches would be useful, and I would like to have both as viable options.
  • Qt Assistant and mouseover

    Unsolved
    9
    0 Votes
    9 Posts
    721 Views
    PerdrixP
    Now if QTextBrowser were based on QtWebEngine (well I can dream can't I).
  • Deleting QChart Causes 30+ Second Application Hang!

    Unsolved
    51
    0 Votes
    51 Posts
    7k Views
    F
    @Christian-Ehrlicher @JoeCFD Thank you for helping find the fix will try what was submitted to the bug report.
  • '#' key press not returning Qt::Key_NumberSign on Mac

    Solved
    3
    0 Votes
    3 Posts
    218 Views
    AndyBriceA
    @ jeremy_k That's what I was looking for - Thanks!
  • My table does't not dynamic update.

    Unsolved
    19
    0 Votes
    19 Posts
    914 Views
    JonBJ
    @architect23 Since the code is identical the difference must come from either the value of filterNode versus new_row or the content of the node pointed to by parent_filter. Maybe lessThan(), which is needed for sorting, is not called because e.g. parent_filter has no children in one case so it does not need to compare to sort?
  • RGB ISSUE WITH DUNFELL

    Unsolved
    3
    0 Votes
    3 Posts
    174 Views
    B
    @Pl45m4 Thanks After changing into BGR also colours occurs in the different format and what way i need to debug the colour issue in the sama5d4 board or dunfell setup?
  • App crashes after deployment

    Unsolved
    11
    0 Votes
    11 Posts
    657 Views
    S
    Looks like now you copied QtPdf, QtPdfQuick and QtVirtualKeyboard. Do exactly the same for QtHunspellInputMethod.
  • How Qt file manager drag drop send upload ?

    Unsolved
    2
    0 Votes
    2 Posts
    165 Views
    jsulmJ
    @sonichy Start here: https://doc.qt.io/qt-6/dnd.html
  • macdeployqt can't link cocoa

    Solved
    3
    0 Votes
    3 Posts
    205 Views
    K
    @SGaist I solved it using the relative path to qt macdeploy qt .../6.8.2/macos/bin/macdeployqt It had some other issues with mimer but after I solved it. The application ran correctly
  • How to use qt_generate_deploy_qml_app_script?

    Unsolved
    2
    0 Votes
    2 Posts
    664 Views
    A
    It seems to be working now, I had to change appDataLogStream to DataLogStream and I am able to run it. Not sure why though. But I still don't understand how to use qt_generate_deploy_qml_app_script? What should I do with the generated script?
  • How to get the qml object's id in the C++ class which defined for QML?

    Unsolved
    2
    0 Votes
    2 Posts
    233 Views
    jeremy_kJ
    Is the goal a QObject *, or the string used in the id? The QObject * is this within the constructor. The string version is available via QQmlContext::nameForObject()
  • MainWindow goes Blank

    Unsolved
    2
    0 Votes
    2 Posts
    151 Views
    SGaistS
    Hi, Which OS are you on ? If macOS, you could start by sampling your application to see if there's something unusual going on.
  • How to properly layout this frame?

    Unsolved
    3
    0 Votes
    3 Posts
    181 Views
    M
    @Pl45m4 Thanks it worked, never had this problem before. It can be set in the designer too [image: e6e55dc9-a86a-4521-8238-0728d90999e2.png]