Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.3k Posts
  • Reporting inappropriate content on the forums

    Pinned Locked spam
    29
    3 Votes
    29 Posts
    34k Views
    A
    Thank you for the report. I have banned the user, which got rid of the spam posting. Not a loss, as this user did not post any other content on the site. Just deleting this one posting was not possible. Thanks for reporting this.
  • Debug of real time dependent app

    Unsolved real time debug
    7
    0 Votes
    7 Posts
    96 Views
    Kent-DorfmanK
    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.
  • Expand Activeqt comapp example to separate classes from main.cpp

    Unsolved forum
    4
    0 Votes
    4 Posts
    53 Views
    A
    The forum doesen't seem to allow posting of code. Do you know how I can get the code to the forum or yourself? [image: 42062091-5367-4899-9c93-a4029925cf29.png]
  • Qt 6: can't create working local QEventLoop while handling aboutToQuit()

    Solved
    3
    0 Votes
    3 Posts
    66 Views
    B
    @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
    4
    0 Votes
    4 Posts
    117 Views
    JonBJ
    @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
    11
    0 Votes
    11 Posts
    189 Views
    D
    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 !
  • Setting up Ffmpeg for QT

    Solved
    4
    0 Votes
    4 Posts
    99 Views
    SGaistS
    What was the issue ? It might help other people
  • 0 Votes
    7 Posts
    100 Views
    Christian EhrlicherC
    Add the qm files to your resources
  • UB or not

    Unsolved
    9
    0 Votes
    9 Posts
    370 Views
    Christian EhrlicherC
    @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
    6
    0 Votes
    6 Posts
    58 Views
    JonBJ
    @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
  • Strange QSettings issue with Qt6 on Jenkins

    Unsolved
    10
    0 Votes
    10 Posts
    208 Views
    JonBJ
    @kehr_I QString QSettings::fileName() const states: Returns the path where settings written using this QSettings object are stored. and also references QSettings::isWritable(). It is noticeable to me that it specifically mentions "writing" yet not "reading". Maybe this is significant for your failed-reading case? Plus isWritable() requires a non-readonly file (might yours be read-only, or lack user write permission?). I suggested you test for read/writability. In principle setPath() ought work, though you don't show it being called or where you set it to. I suggested trying a system-wide path rather than anything to do with, say, the user, at least to test. However since you have an inexplicable problem I suggested you test with a full, explicit path to QSettings() constructor instead of relying on setPath(), just in case. If it's different we know the cause, if it is not nothing is lost. You could have checked this by now.
  • Centre align in QToolButton

    Solved
    2
    0 Votes
    2 Posts
    49 Views
    S
    @shreya_agrawal Found a hack for this. Morph the QToolButton to a QPushButton.
  • 0 Votes
    3 Posts
    48 Views
    S
    @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
    1
    0 Votes
    1 Posts
    13 Views
    No one has replied
  • Register QMetaType with specific ID?

    Unsolved
    3
    0 Votes
    3 Posts
    170 Views
    A
    @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
    11
    0 Votes
    11 Posts
    180 Views
    Christian EhrlicherC
    @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
    16
    0 Votes
    16 Posts
    190 Views
    JonBJ
    @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
    38 Views
    Christian EhrlicherC
    @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
    8
    0 Votes
    8 Posts
    142 Views
    Grit ClefG
    Create at https://bugreports.qt.io/browse/QTBUG-138530
  • the qml file dialog caused the problem.couldnt find the reason.

    Unsolved
    7
    0 Votes
    7 Posts
    82 Views
    JonBJ
    @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?