Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • This topic is deleted!

    Unsolved 6 days ago
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • Debug of real time dependent app

    Unsolved real time debug 8 days ago
    0 Votes
    7 Posts
    170 Views
    Correct. You cannot simulate that level of fidelity in realtime using win/linux/Qt. You would need to drastically lower your iterative frequency and maybe interpolate intermediate values. Otherwise, Do as I mention and use a synthetic timer that has no ties to realtime. As a safety margin on generic desktop systems don't do timers or trigger timed events at periods less than about 50ms (or 20hz). That broadly covers lower HZ values and "usually" handles scheduler noise. Remember that the Qt timers are more for UI responsiveness than tracking high precision events.
  • 0 Votes
    3 Posts
    99 Views
    @hskoglund I think this may be the only way to go, especially if the result of the thread interaction requires any sort of GUI (posting error messages, etc.). It does seem that aboutToQuit() is too late in the sequence. Evidence, after some exploration: My problem was caused by a change in Qt 6.5.0 (link) that moved the signaling point from QCoreApplication::execCleanup() (which explicitly turns off the quitNow flag) to exit() (which doesn't). That flag is what prevents a local QEventLoop in my slot handler from spinning up. It's not clear if they meant to do that, but... That change refers to a bug report (link). A comment by the maintainer says, "The docs for aboutToQuit specify 'Note that no user interaction is possible in this state.'" And indeed they do (link).
  • Changing the taskbar icon

    Unsolved 14 days ago
    0 Votes
    4 Posts
    169 Views
    @TolleTafel You need to set one or both of QApplication::setWindowIcon() and QWindow::setIcon(). See also https://doc.qt.io/qt-6/appicon.html. If by any chance you mean change the icon for every Python script, nothing to do with Qt or your applications, that would be by changing the icon for python.exe.
  • Obtaining MetaData from mp3 files

    Solved 10 days ago
    0 Votes
    11 Posts
    308 Views
    Sooooo, QMediaMetaData tmp = m_mp->metaData(); m_singers = tmp.value(QMediaMetaData::ContributingArtist).toString(); m_title = tmp.value(QMediaMetaData::Title).toString(); m_album = tmp.value(QMediaMetaData::AlbumTitle).toString(); m_duration = tmp.value(QMediaMetaData::Duration).toULongLong(); qDebug() << "Path:" << m_path; qDebug() << "Singers:" << m_singers; qDebug() << "Title:" << m_title; qDebug() << "Album:" << m_album; Works Fine !
  • UB or not

    Unsolved 8 days ago
    0 Votes
    9 Posts
    474 Views
    @DmitryTS said in UB or not: a constant reference extend the life of this temporary object or not? I already answered it...
  • How to find which axis has been clicked on a QChartView

    Unsolved 8 days ago
    0 Votes
    6 Posts
    126 Views
    @kehr_I You have my sympathies. QtCharts was a bit "dodgy" at times. Whether we like it or not it is going away, to be replaced by QtGraphs. I too have zero desire to use anything QML in my code (widgets). I believe it is "supposed" to be callable from widgets app --- presumably all QML/QtQuick stuff to support it will now have to be bundled with widgets app for deployment --- but I have a feeling there was a recent post saying the API "is not available"(?) from widgets, as of the present time at least. It might have said it works for 3D but not 2D. Ah, have a read of https://forum.qt.io/topic/159224/qt-graphs-building-2d-plot-using-c-only
  • Centre align in QToolButton

    Solved 8 days ago
    0 Votes
    2 Posts
    73 Views
    @shreya_agrawal Found a hack for this. Morph the QToolButton to a QPushButton.
  • 0 Votes
    3 Posts
    74 Views
    @Kent-Dorfman the error gives the SAME file - the moc file. What is strange is clean builds on Windows works (my copy using Beyond Compare leaves out the .user and build files) but not clean builds on Fedora. The CMake environment was done using QtCreator. And as I said, I deleted the build directory on Fedora and the problem still occurs. Still trying to get my Ubuntu environment to work (CMake can't fine Qt; I've fixed that before on older systems, but did not have time tonight) So far, it seems to be something due to Fedora or Linux. I did reinstall Qt from qt.io instead of using what fedora wanted to install. Same problem. This makes me wonder if it is due to differences between MingW (on Windows) and g++ on Fedora. If I try CMake directly on Fedora, it can't find Qt. Once I fix that on Ubuntu, I will see if I can fix it on Fedora. Thank you for your answer, and I will get more information
  • This topic is deleted!

    Unsolved 8 days ago
    0 Votes
    1 Posts
    13 Views
    No one has replied
  • Register QMetaType with specific ID?

    Unsolved 8 days ago
    0 Votes
    3 Posts
    217 Views
    @GrecKo Yes, but I'd like it to be somewhat readable and manually editable. But I suppose I could save the type name instead of the id. Thanks.
  • QTableView performance: slow repaint of scroll area viewport

    Unsolved 9 days ago
    0 Votes
    11 Posts
    266 Views
    @svadym said in QTableView performance: slow repaint of scroll area viewport: I can try to submit a bug report if you say that it's not normal. This would be nice. With a small reproducer (main.cpp only), a recent Qt version (6.9 and up) and some benchmark results from you. Also reduce the update rate to e.g. 10hz. It's fast enough - Noone can read that fast.
  • how to override qtcharts QBarSeries?

    Unsolved 10 days ago
    0 Votes
    16 Posts
    334 Views
    @Christian-Ehrlicher said in how to override qtcharts QBarSeries?: the export macros are wrong. Which is exactly what I wrote above in https://forum.qt.io/post/829183. I don't know about "name clash". Anyway if you are sure this cannot be done by adding a new subclass in own code then I am sure you will be right and the OP would be best just changing the existing Qt source.
  • 0 Votes
    2 Posts
    47 Views
    @PuskasAlex said in QDesktopServices::openUrl() fails in Qt 6.8 on macOS for file paths with special characters ([, ]): There is any workaround? Except creating a bug report (search before if there is already one) - compare the code between Qt5 and Qt6 - maybe you can spot the problem.
  • QImageReader could not find the size of images

    Unsolved picture qt6 windows imageformats 12 days ago
    0 Votes
    8 Posts
    183 Views
    Create at https://bugreports.qt.io/browse/QTBUG-138530
  • the qml file dialog caused the problem.couldnt find the reason.

    Unsolved 9 days ago
    0 Votes
    7 Posts
    105 Views
    @nicker-player I see that now, I did not notice it (if it was there) when I posted originally. I know nothing about QML, but file:///D:/program/qt/5.14.1/msvc2017/qml/QtQuick/Controls/Styles/Desktop/TableViewStyle.qml:109:13: Unable to assign QQmlListModel to QString looks to me like styleData.value is an actual QQmlListModel? Which obviously cannot be converted to a string. So, however you do it in QML, what it is the bound value (or its type) in whatever cell in your table?
  • Multimedia recording filtered to 20kHz bandwidth

    Solved 10 days ago
    0 Votes
    8 Posts
    181 Views
    Ah! It's PipeWire. pw-cat --record --target alsa_input.usb-Hanlincrest_Ltd._FUNcube_Dongle_V2.0-00.pro-input-0 --rate 192000 --format s16 sdr.raw sox -t raw -r 192000 -e signed -b 16 -c 2 sdr.raw sdr.wav ...results in a wav file with the same 20kHz filtering. Now I need to find out how to fix that. "Pro Audio" setting isn't working. I guess this is solved from a Qt point of view.
  • Building Qt Multimedia from sources on Windows

    Unsolved 10 days ago
    0 Votes
    2 Posts
    46 Views
    @Pedro-Vicente Check the config.log file or use -v parameter when calling configure to get more information.
  • How to get the android-g++ ?

    Unsolved 9 days ago
    0 Votes
    2 Posts
    49 Views
    @Khadeer Why do you need the Gnu compiler? Just recompile using clang from Android NDK.
  • Custom Widget put in ScrollArea with no scrollbar

    Solved 11 days ago
    0 Votes
    8 Posts
    161 Views
    @Zbigniew-Sch Thank you for your answer, I have solved my problem. I created custom MyWidget derived from QWidget and overwrited paintEvent method. Then called setGeometry in constructor method and called resize() when scaled. It works as I want.