Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • QAudioOutput start method not supported - QT6

    Unsolved
    8
    0 Votes
    8 Posts
    988 Views
    Christian EhrlicherC
    You're right. The forum search function found this: https://forum.qt.io/topic/130480/porting-qaudiodevice-to-qt6-2
  • Downloading a File with QNetworkAccessManager is 30 Times Slower than It Should Be

    Unsolved
    3
    0 Votes
    3 Posts
    428 Views
    QrqtowQ
    @jsulm None of them is emitted and the file is downloaded successfully. What else can I try?
  • Delete QProcess started in MainWindow::closeEvent

    Solved
    10
    0 Votes
    10 Posts
    905 Views
    H
    @JonB said in Delete QProcess started in MainWindow::closeEvent: sounds like AV-specific behaviour anyway. Actually this is just a scenario I am making up in my head. I am not sure this actually happen. So just forget it. No, do your deletions in program. Unless you have a very good reason not to do so, which will not be the case. They don't take that long, and using up more & more memory is worse. Thanks, I will do that.
  • How can i change time zone?

    Unsolved
    4
    0 Votes
    4 Posts
    1k Views
    JonBJ
    @Yaldiz No, as I said there is no static void QTimeZone::setTimeZone() function. There are C library calls like tzset() which work off an (TZ?) environment variable you could alter. But I do not know which Qt or other libraries calls use that versus a more native timezone OS call.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    24 Views
    No one has replied
  • This topic is deleted!

    Solved
    2
    0 Votes
    2 Posts
    8 Views
  • QSerialPort open error code 10

    Solved
    54
    0 Votes
    54 Posts
    13k Views
    C
    @addebito , I have an issue more or less the same as you. I suppose the main issue comes from one program that has opened the serial port and initialed any DCB parameters, when your Qt program opens the device, Qt driver does not reset all DCB data, but some parameters did not suitable for QtSerialPort, so the issue comes up. here is a DCB that first open after the PC reset: [image: 12289801-ad2e-44f7-baf9-00fc46351e2e.png] here is a DCB being opened by another program, it changed XoffLim/XonLim [image: d65bfe48-77f2-4379-ae98-65e7f39ae8ed.png] so, I write some code clear DCB before Qt open serial port: #if (defined (_WIN32) || defined (_WIN64)) void clearSerialPort (const QString &path) { #include <winbase.h> QString deviceString = path.startsWith(QLatin1String("COM")) ? (QLatin1String("\\\\.\\") + path) : path; HANDLE handle = ::CreateFile( reinterpret_cast<const wchar_t*>(deviceString.utf16()), GENERIC_READ | GENERIC_WRITE, 0, nullptr, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, nullptr); if (handle == INVALID_HANDLE_VALUE) { return; } DCB dcb; memset(&dcb, 0, sizeof(DCB)); //::ZeroMemory(dcb, sizeof(dcb)); dcb.DCBlength = sizeof(DCB); if (::GetCommState(handle, &dcb)) { dcb.XoffLim = 0; dcb.XonLim = 0; ::SetCommState(handle, &dcb); } ::CloseHandle(handle); } #endif
  • Question on TreeView arrow expander

    Solved
    3
    0 Votes
    3 Posts
    286 Views
    SGaistS
    Hi, Which post was it ? That might help other people coming to this thread.
  • Stylesheet for checkboxes animation

    Solved
    15
    0 Votes
    15 Posts
    2k Views
    L
    Ok thanks.
  • QCreator in design mode doesn't show my window

    Unsolved
    1
    0 Votes
    1 Posts
    129 Views
    No one has replied
  • Moving items in QTreeView

    Unsolved
    2
    0 Votes
    2 Posts
    281 Views
    JonBJ
    @ivanicy QTreeView simply displays the parent, child & sibling hierarchy of its model. Get things in the right place there and the treeview will reflect it. You cannot move items, remove them from where you don't want them and insert them where you do. but I need to avoid the case that I move an item inside another item. I don't want to create item children. I only want to move the items order. You have to "move an item inside another item" if you want to change parent/child/depth. If only at sibling level, remove and re-insert as desired.
  • QListWidget, get item position in list?

    Solved
    7
    0 Votes
    7 Posts
    7k Views
    SPlattenS
    @JonB , thank you.
  • QRegExp assigning a value based on a condition

    Unsolved
    5
    0 Votes
    5 Posts
    367 Views
    NevezN
    yes, this link gave me an idea on how to do the conditional and I tried it and it worked. Thanks
  • [QFile] Why QFile::map QFile::unmap sometimes took a long time ?

    Moved Unsolved
    10
    0 Votes
    10 Posts
    1k Views
    D
    @SimonSchroeder I agree your point that it's hard to have the full control of disk since there is an OS between disk and us. Especially your 3rd point, I have the same thought either. BTW, I gave up calling QFile::map and QFile::unmap but calling the CreateFileMapping+MapViewOfFile and UnmapViewOfFile respectively. Good news is that CreateFileMapping is the culprit of taking up the most time of QFile::map, I mean spike is caused by CreateFileMapping API. However, it's still not sure why it took so much time and keeping waiting for Microsoft's reply.
  • QTableView Header GripMargin

    Unsolved
    1
    0 Votes
    1 Posts
    151 Views
    No one has replied
  • QListWidget, choice and revert

    Solved
    4
    0 Votes
    4 Posts
    416 Views
    JonBJ
    @SPlatten QListWidgetItem::listWidget()->row(item). However, you may be safer using QListWidgetItem::listWidget()->findItems(item->text()), instead of relying on indexes staying the same, depending on what you are doing.
  • libEGL warning DRI2 : failed to authenticate?

    Unsolved
    7
    0 Votes
    7 Posts
    1k Views
    I
    @jsulm No It doesn't start as root.
  • scrollbar animation effect

    Unsolved
    1
    0 Votes
    1 Posts
    237 Views
    No one has replied
  • Ninja missing and no known rule to make it

    Solved
    5
    0 Votes
    5 Posts
    14k Views
    M
    Use add_library(...) in your 'projectA' instead of qt_add_executable(...).
  • QVideoProbe and avi format

    Unsolved qtmultimedia qvideoprobe avi
    1
    0 Votes
    1 Posts
    458 Views
    No one has replied