Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • Add Color to Image in Animation (Cross Dissolve Effect)

    Solved
    4
    0 Votes
    4 Posts
    518 Views
    ?
    @JoeCFD Thank you so much! The InCirc/OutCirc curves worked!
  • debug build - continue after Q_ASSERT (no abort)

    Solved
    5
    1 Votes
    5 Posts
    1k Views
    KH-219DesignK
    I, too, have reinvented this wheel. I was "spoiled rotten" (on this axis, anyway) by using wxWidgets, which does imbue its assert macro with an optional "assert-then-continue" feature. Here you can find my cobbled-together variation on this theme, which works on Linux and Windows. (it also worked on Mac a while back, but I haven't tested recently, and MacOSX has been changing at a fast pace.)
  • Duplicate and rename project in Qt6 with CMake

    Unsolved
    5
    0 Votes
    5 Posts
    948 Views
    VRoninV
    @Bert59 said in Duplicate and rename project in Qt6 with CMake: #project(Project_1 VERSION 0.1 LANGUAGES CXX) If you comment out this line how is CMake supposed to know what the project name is? that's what the error is telling you
  • beginInsertRows & endInsertRows doesn't refresh enough items in view

    Solved
    4
    0 Votes
    4 Posts
    404 Views
    jronaldJ
    The problem should be in QModelIndex DemoModel::parent(const QModelIndex &index) const row in returned QModelIndex should be relative to grand parent. Thanks
  • Does QSqlTableModel have a limit of records?

    Solved
    5
    0 Votes
    5 Posts
    922 Views
    ?
    @JonB I have Qt-Version 5.15.3.
  • QSortFilterProxyModel strange behavior with QRegExp

    Solved
    22
    0 Votes
    22 Posts
    3k Views
    ?
    My problem was solved in this Thread: https://forum.qt.io/topic/131616/does-qsqltablemodel-have-a-limit-of-records
  • QTableWidget's currentCellWasChanged called twice

    Unsolved
    2
    0 Votes
    2 Posts
    169 Views
    SGaistS
    Hi, Which version of Qt ? On which OS ? Can you provide a minimal compilable example that reproduces that behaviour ? Did you check the old and current values ? How do you implement your widget hiding ?
  • QFormLayout, background colour

    Solved
    2
    0 Votes
    2 Posts
    545 Views
    SPlattenS
    @SPlatten , solved, the layout was contained in a widget: mpobjErrors->setStyleSheet("background-colour:#ff0000;");
  • 0 Votes
    15 Posts
    2k Views
    D
    since 29 March 2021 until today (already 7 months), the application not crashing anymore due to every midnight i did restart the operating system Windows Server 2016. Today i just had meeting with our vendor, the vendor still saying nothing wrong with the application , not admitting their application that caused the crash problem, and blame our server's operating system that having problem. I am not programmer/developer so i have nothing to say. At the end of the discussion, our vendor informing us to use Linux Red Hat operating system which they claimed no issue. I will discuss internally about this.
  • New line (\n) doesn't work

    Solved qstring
    4
    0 Votes
    4 Posts
    11k Views
    K
    @Paul-Colby thank you
  • Replace (MIME)=(*)

    Solved
    3
    0 Votes
    3 Posts
    279 Views
    sonichyS
    @SGaist said in Replace (MIME)=(*): Hi, Since there's no question, are you asking why the regular expression you are using to replace =* does not work ? That's because * has a specific meaning in regular expressions. It means 0 or more times the preceding expression. So if you want to detect in a string you need to escape it. On a side note, you should move to QRegularExpression as QRegExp has been deprecated in Qt 5 and removed in Qt 6. Done ! //s.replace(QRegularExpression(MIME + "=*\n"), MIME + "=" + FI.fileName()); s.replace(QRegularExpression(MIME + "=.*\n"), MIME + "=" + FI.fileName() + "\n");
  • QWebEngineView background color before calling setHtml

    Unsolved
    1
    0 Votes
    1 Posts
    392 Views
    No one has replied
  • QLineEdit in Qt6 not work with fcitx

    Solved
    3
    0 Votes
    3 Posts
    869 Views
    jronaldJ
    UPDATE Fixed by swithing to fcitx5. BTW, it crashes by accident and be solved by deleting ~/.config/fcitx5 and reconfiguring. @SGaist said in QLineEdit in Qt6 not work with fcitx: did you try a more recent version of fcitx ? Not yet, it's said fcitx 4 is under maintance only now, I'll try fcitx 5 Thanks
  • QHeaderView doesn't change when QTableView's model is reset.

    Solved
    7
    0 Votes
    7 Posts
    452 Views
    D
    @SGaist, that was the issue. Now, with these in else block: else{ diff = abs(diff); for (int i = 0; i < diff; i++) { auto line = lineEdits.takeLast(); delete line; } } it shows the right number of line edits in header and the qDebug output is also correct. I haven't measured the time BUT feels like this approach is little bit slower than the previous approach (removing all old and adding new). I also have removed this connect(this, &TableHeader::sectionCountChanged, this, &TableHeader::onSectionCountChanged); and call reset directly in the TableWidget: void TableWidget::queryDatabase(){ db.open(); tableModel->setTable(tableName); tableHeader->resetBoxes(tableModel->columnCount()); tableProxy->setQueries(tableHeader->getQueries()); tableModel->select(); while (tableModel->canFetchMore()) tableModel->fetchMore(); db.close(); }
  • QFileSystemModel and setRootPath

    Unsolved
    2
    0 Votes
    2 Posts
    204 Views
    Christian EhrlicherC
    It does what the documentation describes. There is also a note: "Note: This function does not change the structure of the model or modify the data available to views. In other words, the "root" of the model is not changed to include only files and directories within the directory specified by newPath in the file system." Pass the returned model index to https://doc.qt.io/qt-5/qabstractitemview.html#setRootIndex
  • Cannot create QJsonDocument from a QJsonObject

    Unsolved
    2
    0 Votes
    2 Posts
    295 Views
    M
    @Dy3zz said in Cannot create QJsonDocument from a QJsonObject: I got the next error: variable has incomplete type "QJsonDocument". Any ideas what i am missing? Thank you #include <QJsonDocument> ?
  • QAudioInput: failed to open audio device

    Solved
    9
    0 Votes
    9 Posts
    2k Views
    A
    This issue has been solved at c++ - QAudioInput: failed to open audio device. Solution: 16bit audio must be signed integer. DataFormat.setSampleType(QAudioFormat::SignedInt);
  • signal/slot connection calls wrong instance

    Solved
    11
    0 Votes
    11 Posts
    565 Views
    D
    Just to close this: I rearranged my code so that I don't need to cast interface pointer and removed Qt-signal connections. Works perfect with own written Interface-callbacks.
  • Keystroke is forwarded unintentionally

    Solved
    13
    0 Votes
    13 Posts
    634 Views
    D
    Just to close this: I added a timecode check and this way I could sort out the unwanted/wrong keyevent.
  • check call stack / get rid of call-origin?

    Unsolved
    1
    0 Votes
    1 Posts
    139 Views
    No one has replied