Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.3k Posts
  • 0 Votes
    12 Posts
    4k Views
    S
    @jsulm Thanks for your instant replies.
  • How to clear QNetworkReply->ignoreSslErrors?

    Solved
    2
    0 Votes
    2 Posts
    2k Views
    K
    Ok, so this probably has something to do with keep-alive in http(s). That is, the connection is opened, at which point an ssl error may result in aborting the connection or not. But when subsequent requests are made, there's probably already an open connection, so it won't redo the SSL handshake and thus won't apply new ignore settings. When I call QNetworkAccessManager->clearAccessCache() (closing any open connections) when the setting changes, the new ignore settings take immediate effect.
  • QTreeView not showing headers after overriding

    Solved
    3
    0 Votes
    3 Posts
    350 Views
    Match0umM
    @mrjj said in QTreeView not showing headers after overriding: QTreeView::mouseMoveEvent(event); Thank you, it works now 😊 !
  • Crash on exit, stack smashing detected

    Solved
    4
    0 Votes
    4 Posts
    2k Views
    pauleddP
    Okay, this was really weird. I did a "BUILD->Clean Project "" for all configuration" and rebuild it and the problem is gone... Maybe I messed with some garbage remnant... never mind! Marked as Solved.
  • Working with null terminated values

    Unsolved
    3
    0 Votes
    3 Posts
    324 Views
    P
    ok, I understand. So i changed now to const TCHAR* convertToFoxValue(const QString& strValue) { #if defined (WIN32) TCHAR *someVar=new TCHAR[strValue.size()+1]; strValue.toWCharArray(someVar); //set last caharacter to null terminator someVar[strValue.size()]=L'\0'; return reinterpret_cast<const TCHAR *>(someVar); #else TCHAR *someVar=new TCHAR[strValue.size()+1]; QByteArray pass = strValue.toUtf8(); strcpy(someVar,pass.data()); return reinterpret_cast<const TCHAR *>(someVar); #endif } About your question of delete I want to use: const TCHAR *string = convertToFoxValue(rootPath);; file.lpszDestinationPath = string; delete [] string; I hope this is not wrong.
  • How to get the pointer or name of a widget when dragging an item

    Solved
    3
    0 Votes
    3 Posts
    341 Views
    SisqosS
    @mrjj Thank you. The code works perfectly.
  • This topic is deleted!

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

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

    Unsolved
    3
    0 Votes
    3 Posts
    23 Views
  • QT_FONT_DPI brain-dead by design?

    Solved
    4
    0 Votes
    4 Posts
    2k Views
    Kent-DorfmanK
    FYI - decided that investing in two 40in 1080p monitors of the same type was the easier solution. Problem solved. LOL
  • RGB Image Array produces an Array with random newlines here and there, why?

    Unsolved
    5
    0 Votes
    5 Posts
    442 Views
    Kent-DorfmanK
    I think another important consideration is why you are sending the image as a text json object over a socket. The sockets can accept binary data. send it as a series binary chunks, including some control meta-data like dimensions, pixel bit format, and checksum. That will drastically decrease your storage requirements. As a rule nothing wrong with sending integer data in binary over the net. Where is gets crazy is sending floating point data over a network.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    8 Views
    No one has replied
  • Placing TableWidget Header Labels at runtime

    Solved
    4
    0 Votes
    4 Posts
    373 Views
    DriftwoodD
    @Christian-Ehrlicher - Thank you. @mrjj - I found the QStringList on SO and already have it in place. Thank you both for your help.
  • Passing QObjects across threads via signals and slots

    Unsolved
    11
    0 Votes
    11 Posts
    2k Views
    JKSHJ
    @JonB said in Passing QObjects across threads via signals and slots: does this mean in practice that you cannot pass a QObject from a signal to a slot? Yes, you can. QNetworkAccessManager::finished(QNetworkReply*) is one such signal; QNetworkReply is a QObject. Since you are all saying that neither & nor * are good for QObject across threads Hold up. Take a deep breath. Let's untangle things a bit. You cannot use const QObject& as a signal/slot argument between threads, ever. Because QObjects are not copyable. You can use QObject* as a signal/slot argument between threads. @Christian-Ehrlicher and @mrjj did not say it's not allowed; they said it's dangerous. I am getting very lost now. Because when people ask "how do I pass the widget which caused a signal to the slot if that's what I need to do" one of the possible answers we give is "write a lambda which accepts the widget as an extra parameter", like: connect(checkbox, &QCheckBox::pressed, that, [checkbox]() { qDebug() << checkbox; }); Well, there's no multithreading here. So it's not dangerous.
  • can I use MyClass& in Qt signal and slots?

    Solved
    5
    0 Votes
    5 Posts
    576 Views
    JKSHJ
    [Side discussion forked to https://forum.qt.io/topic/125858/passing-qobjects-across-threads-via-signals-and-slots ]
  • tabletEvent not getting called on Windows 10

    Unsolved
    1
    0 Votes
    1 Posts
    158 Views
    No one has replied
  • QGridLayout span problems

    Unsolved
    1
    0 Votes
    1 Posts
    216 Views
    No one has replied
  • Qt 5.15.2 Q3D Object picking does not work on custom geomentry

    Unsolved
    4
    0 Votes
    4 Posts
    339 Views
    V
    I'm back once again. Don't beleave it myself though. After a little bit more experimentaion the following knowledge is obtained: this bug is NOT only with custom mesh but with any mesh (even from Qt3DExtras) it seems to have something with bounding volume: in the function bool HierarchicalEntityPicker::collectHits(NodeManagers *manager, Entity *root) (pickboundingvolumeutils.cpp) line 786 :queryResult = rayCasting.query(m_ray, current.entity->worldBoundingVolume()); line 787: if (accepted && queryResult.m_distance >= 0.f && (current.hasObjectPicker || !m_objectPickersRequired)) the if statement is not fullfilled for small volumes. The worldBoundingVolume() returns structure with m_raidious == -1 (but the object being clicked is perfectly fine) Maybe developers could spend some time and debug it as they understand what's going on much better than I do. Also some workaround for the current Qt 5.15.2 version is appreciated!
  • 0 Votes
    18 Posts
    4k Views
    G
    @Bonnie finger crossed, QSslSocket::supportsSsl(); using the build compiled with OPENSSL_PREFIX seems to return true, so i'm pretty optimistic about the thing that it should work properly! I don't know if i'm finally out of that nightmare but a huge THANKS in any case
  • QChart in C++: How to get the y-axis value of more than one QLineseries at a time ?

    Unsolved
    2
    0 Votes
    2 Posts
    2k Views
    M
    Hi, I'm just evaluating Qt Charts for a similar use case that your are describing. Did you solve the issue in the meantime? An idea might be that you track the different multiples of your sampling rate. So if Line1 has 100 and Line2 has 20 you have a factor of 1/5 that gives you the index of Line2 in case you Crosshair cursor is linked to Line1. If your sampling rate is not certain multiple you probably can only do a search for the right index given from the (time?) value of the x-axis. I haven't checked other Qt Chars possibilities yet. Maybe there is a sort of tracker mechanism that allows you to do so. Some other people answered to similar questions that this example https://www3.sra.co.jp/qt/relation/doc/qtcharts/qtcharts-callout-example.html might be a good starting point for a solution. Please let me know if you found a good approach. Best Regards Markus