Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.6k Posts
  • 0 Votes
    7 Posts
    948 Views
    Christian EhrlicherC
    That's the reason we request a mre 🙂
  • How to increase object file section capacity

    Unsolved
    21
    0 Votes
    21 Posts
    5k Views
    Christian EhrlicherC
    @mzimmers said in How to increase object file section capacity: and is this the preferred syntax Yes
  • Test Crash Because Of Fontfamilyalias

    Unsolved
    2
    0 Votes
    2 Posts
    199 Views
    Christian EhrlicherC
    You should use a debugger to see where it really crashes and if you can reproduce it, create a minimal, compilable example so we can also take a look on it.
  • How to Implement an Async Server with QDBus?

    Solved
    5
    0 Votes
    5 Posts
    496 Views
    L
    @SGaist Thank you very much. I read https://doc.qt.io/qt-6/qdbusdeclaringslots.html#delayed-replies before asking this question, but that wasn't what I was looking for. The D-Bus adaptors in my project are automatically generated with CMake, and the behavior isn't correct when I directly use the extra QDBusMessage parameter at the end of the search() parameters. And I figured out how to do it after a few tries. The nitty-gritty of solving the problem is using Q_EMIT to send an async completion signal to the client, with the results passed along at that point. Here is a simple example to demonstrate the solution: public slots: // Asynchronously search Q_NOREPLY void async_search(QString keywords) { ... // Pass the results and notify the client once the time-consuming logic is finished Q_EMIT asyncSearchCompleted("test result"); } Q_SIGNALS: void asyncSearchCompleted(const QString& result); To handle the results on the client side, we connect the signal to a slot: QDBusInterface *iface = ...; connect(iface, SIGNAL(asyncSearchCompleted(QString)), this, SLOT(handleSearchResult(QString))); public slots: void handleSearchResult(const QString &result) { qDebug() << "Received async search result:" << result; }
  • Qt crashes when starting up

    Unsolved
    2
    0 Votes
    2 Posts
    233 Views
    Axel SpoerlA
    Maybe this bug: https://answers.microsoft.com/en-us/windows/forum/all/bluescreen-error-code-d1-bsod-windows-11/2f50a875-290d-44c5-85dd-e0c2db4b0a1d
  • Copying text from QTextEdit to .odt file and retain formatting

    Unsolved
    5
    0 Votes
    5 Posts
    519 Views
    A
    Thanks for the clarification. I wanted to copy the code directly from my editor to generate some documentation. I think I will instead use a proper documentation system and let it handle the highlighting.
  • Qt theme in pure qss

    qss
    1
    0 Votes
    1 Posts
    687 Views
    No one has replied
  • Getting Access Token from Google Cloud service account

    Solved
    5
    0 Votes
    5 Posts
    568 Views
    L
    It seems this code works fine: https://jorisvergeer.nl/2023/03/22/c-qt-openssl-jwt-minimalistic-implementation-to-create-a-signed-jtw-token/
  • Qt3d: Looking for resources about offscreen rendering & shadows

    Unsolved
    2
    0 Votes
    2 Posts
    217 Views
    K
    Hello! I totally relate to you. It would be very helpful if Qt3D supported Shadow Mapping (and Reflection). Immediately, all Scenes in Qt3D would be instantly realistic. It just looks as if Qt stopped Qt3D development half-way. If any of you have news on further Core-Implementations, let us know. Us and a big community. regards, kevin_d
  • SQLite plugin rebuild and modification with Qt6 and CMake. How?

    Unsolved
    3
    0 Votes
    3 Posts
    380 Views
    Christian EhrlicherC
    @bogong said in SQLite plugin rebuild and modification with Qt6 and CMake. How?: QtCommercial You should ask the Qt support. Manuals with examples for Windows building process mostly only small part for MacOS. There are examples for unix so use them. There is not much difference between unix and macos wrt this.
  • Real example of multithreaded QHttpServer?

    Solved
    2
    0 Votes
    2 Posts
    325 Views
    C
    This code: #include <QCoreApplication> #include <QTcpServer> #include <QHttpServer> #include <QtConcurrent> #include <QDebug> QHttpServerResponse handleRequest(int id) { qDebug() << "Start" << id << QThread::currentThread(); QThread::sleep(5); qDebug() << "Finish" << id; return QHttpServerResponse("response text\n"); } int main(int argc, char **argv) { QCoreApplication app(argc, argv); QHttpServer server; server.route("/", [] (int id) { return QtConcurrent::run(&handleRequest, id); }); auto tcpserver = new QTcpServer(qApp); if (!tcpserver->listen(QHostAddress::Any, 30000) || !server.bind(tcpserver)) { return -1; } qDebug() << "Listening on port" << tcpserver->serverPort(); return app.exec(); } Produces results like this: ./test Listening on port 30000 Start 0 QThreadPoolThread(0x5d512f61d580, name = "Thread (pooled)") Start 2 QThreadPoolThread(0x5d512f8b6400, name = "Thread (pooled)") Start 1 QThreadPoolThread(0x5d512f62ecb0, name = "Thread (pooled)") Start 4 QThreadPoolThread(0x5d512f630430, name = "Thread (pooled)") Start 3 QThreadPoolThread(0x5d512f8b6ce0, name = "Thread (pooled)") Finish 0 Finish 4 Finish 1 Finish 2 Finish 3 ^C when tested with: curl -o - http://localhost:30000/0 & curl -o - http://localhost:30000/1 & curl -o - http://localhost:30000/2 & curl -o - http://localhost:30000/3 & curl -o - http://localhost:30000/4 & Request processing is interleaved, multi-threaded. The size of the thread pool is limited so more requests will start waiting. Using curl --parallel changes the behaviour with respect to the first request curl sends.
  • SSL error when downloading files with url

    Unsolved
    9
    0 Votes
    9 Posts
    938 Views
    SGaistS
    Did you check that the dlls are found and loaded by your application ?
  • Qt Windows desktop: QMediaPlayer error code 0x80040218.

    Unsolved
    7
    0 Votes
    7 Posts
    3k Views
    W
    @SGaist @gulfoslides Hello, I also encountered this issue. And after I installed divx, the issue is still not resolved. Could you guys please help me with this? Thanks a lot!
  • Qt build folder has sub folders for debug and release

    Solved
    10
    1 Votes
    10 Posts
    2k Views
    SGaistS
    Hi and welcome to devnet, I think the comment I posted above is still valid.
  • Qt6.7 Compile Failed From Source In Windows11

    Unsolved
    6
    0 Votes
    6 Posts
    2k Views
    0
    With a complete rebuild it finaly worked.
  • QTcpSocket accessable between different cpp files.

    Unsolved
    9
    0 Votes
    9 Posts
    971 Views
    N
    @JonB Thank you, could you provide a full example using the connect command?
  • OpenGl in QOpenGLWidget does not render texture on Qt6 while on Qt5 works fine

    Unsolved
    3
    0 Votes
    3 Posts
    313 Views
    SGaistS
    Hi and welcome to devnet, Did you find a solution since you deleted your posts ?
  • QFileDialog won't show up when QGraphicsScene::update() is called

    Unsolved
    6
    0 Votes
    6 Posts
    596 Views
    SGaistS
    QFileDialog is a native dialog so it might react a bit differently with regard to other widgets.
  • 0 Votes
    17 Posts
    2k Views
    Christian EhrlicherC
    @GrecKo said in Image gets de-pixalated or distorted (unclear) when we change the desktop display scale to 125%: That's what setDevicePixelRatio does. Did I said something else? I was (and still am) under the impression that he wants to draw with 1000x1000 ...
  • 0 Votes
    7 Posts
    728 Views
    M
    @SGaist Hello, have you had a chance to look at my last message?