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
    5 Posts
    422 Views
    mrjjM
    Hi Im not sure it works on all macOS versions but does brctl log --wait --shorten show anything useful? We could run that tool via QProcess for an easy solution not involving using native code. https://apple.stackexchange.com/questions/151421/how-do-i-know-if-a-file-has-been-successfully-synced-to-icloud-drive
  • Qt Remote Objects vs MQTT

    Unsolved mqtt remote remote objects qtro websocket
    3
    0 Votes
    3 Posts
    1k Views
    SGaistS
    Hi, There's a pretty interesting Ars Technica article about netcode in fighting games. Worth a read.
  • QPainter and QOpenGLWidget - Text Corruption

    Unsolved
    4
    0 Votes
    4 Posts
    411 Views
    mrjjM
    Hi Using the code from the other post #include <QApplication> #include <QOpenGLWidget> #include <QOpenGLFunctions> #include <QPainter> class MyOpenGLWidget : public QOpenGLWidget { public: MyOpenGLWidget() {} void initializeGL() { QOpenGLFunctions *f = QOpenGLContext::currentContext()->functions(); f->glClearColor(1.f, 1.f, 1.f, 1.f); } void resizeGL(int w, int h) { QOpenGLFunctions *f = QOpenGLContext::currentContext()->functions(); f->glViewport(0, 0, w, h); } void paintGL() { QOpenGLFunctions *f = QOpenGLContext::currentContext()->functions(); f->glClear(GL_COLOR_BUFFER_BIT); QPainter painter(this); painter.setPen(Qt::black); painter.setFont(QFont("Arial", 56)); painter.drawText(0, 0, width(), height(), Qt::AlignCenter, "Hello World!"); painter.end(); } }; int main(int argc, char **argv) { QApplication app(argc, argv); MyOpenGLWidget wnd; wnd.resize(400, 300); wnd.show(); return app.exec(); } [image: CPWn5y.png] Tried on win 10, win 7 and linux and had no text corruption. Where are you seeing this ?
  • How to close GUI application?

    Solved
    3
    0 Votes
    3 Posts
    310 Views
    MucipM
    Hi @jsulm , You're right sir. I was trying to delete pointer twice unfortunately. :) Regards, Mucip:)
  • How to create animation from 100 Photoshop PNGs?

    Unsolved animation keyframes help
    2
    0 Votes
    2 Posts
    601 Views
    mrjjM
    Hi and welcome to the forums Why not export it directly to a video format ? Like mp4 etc ? ( from photoshop) ( and play that file in Qt) Also how big is the frames ? Would something like animated gif work ?
  • QTableWidget: I need to know the text color on cell

    Solved
    5
    0 Votes
    5 Posts
    3k Views
    S
    Oh yes! I've found 😊 Many thanks.
  • QByteArray function

    Solved
    11
    0 Votes
    11 Posts
    728 Views
    U
    @Christian-Ehrlicher I see, thanks. Is that the reason for the QByteArray not displaying when trying to use?
  • Bluetooth module not working with CMake

    Solved
    2
    0 Votes
    2 Posts
    506 Views
    G
    When I compile project from command line everything worked. Probably problem was related with my IDE (CLion).
  • Veracode when using QT?

    Solved
    3
    0 Votes
    3 Posts
    433 Views
    S
    At the end i found the solution is very simple. Basically for every supplied exe or dll file it requires pdb file. Unfortunatelly urrect 5.13.x version doesnt have it unless i dont want to compile all qt with that. But if I use mainstenancetool.exe then for version 5.12.x it is available under Qt Debug Information Files, then all pdb files are in dir 5.12.x/msvc2017/bin. as per pdb file for my exe file, i just added into .pro file: QMAKE_CXXFLAGS += -Zi QMAKE_CXXFLAGS += /GS- QMAKE_LFLAGS += /INCREMENTAL:NO QMAKE_LFLAGS += /DEBUG:FULL and when recompiled, the pdb file for the app was created. Also, important info regarding veracode requirements was that it needs msvc compiler instead of MinGW, so had to use it too (but also when I initialy tried with MinGW it also somehow worked too, mabye someine in the future will have luck with this compiler too). Also for the future googlers, the veracode is works with all exe+dll files what you supply, if you decide not to supply any importand dll, then it scans only what you supply regardles the dll is realy needed. Because I was not able to find on internet my custom mysql connector dll (libmysql.dll and its pdb file) Hope this helps for whomever it will google this issue in the future.
  • QSqlQuery A fail after QSqlQuery B exec an invalid SQL

    Unsolved
    3
    0 Votes
    3 Posts
    314 Views
    JonBJ
    @mmiacca You have a "nested" second QSqlQuery. I do not know if that is supposed to work, or maybe it depends on the driver --- I can imagine issues with this --- but https://stackoverflow.com/questions/42978239/qt-nested-qsqlquery-not-working reports the same as you. And got no solution. If you continue to have problems with this, the usual would be to let the first query exhaust all its next()s so it is finished, save up what you need from it (name, description, whatever) into a vector/list/similar, and use that to generate the second QSqlQuerys outside of that loop. Or, write a cleverer SQL statement (like a JOIN) to achieve whatever you are trying to get here. It's not great "form" to be trying to run a new query each time round another query.
  • Link a QTreeView to items in a QGraphicsScene

    Solved
    3
    0 Votes
    3 Posts
    653 Views
    S
    @mrjj Thanks! I have managed to get something working with the standard QItemSelectionModel. I guess it's just a case of keeping the scene items and list items synced with signals.
  • Input text, but with some another material

    Unsolved
    2
    0 Votes
    2 Posts
    158 Views
    mrjjM
    Hi What about a QTableView+ model or QTableWidget with 2 columns Rolename: value
  • Basic question - What am I doing wrong here?

    Solved
    6
    0 Votes
    6 Posts
    273 Views
    U
    Thank you. That worked!
  • QtConcurrent vs QThread CPU Usage

    Solved qtconcurrent qthread cpu usage multithreading
    11
    0 Votes
    11 Posts
    3k Views
    R
    I CUDA not build it unfortunately. CUDA is only supported in Visual Studio for Windows so I guess its back to good old uncle GL ...
  • Find out which library is causing "Cannot mix incompatible Qt library"

    Solved
    7
    0 Votes
    7 Posts
    23k Views
    Pablo J. RoginaP
    @Sacha-Hony said in Find out which library is causing "Cannot mix incompatible Qt library": seems to be solved, so please don't forget to mark your post as such! Thanks.
  • Is it Ok to emit a signal from a thread?

    Unsolved
    2
    0 Votes
    2 Posts
    229 Views
    fcarneyF
    Signals and slots employ mutexes and can be used to communicate between threads. Just make sure you pass by value or have mutexes to guard data access if passing by other means. I have had issues passing by reference so I am not sure it can be done. You can even use slots to communicate to objects inside threads, however you need to be evaluating the Qt event loop inside that thread if you do so.
  • Can't create the assistant file. when "qhelpgenerator *qhp -o *qhc"

    Unsolved
    1
    0 Votes
    1 Posts
    155 Views
    No one has replied
  • How to update MaintenanceTool so that I can add datavisualization component

    Solved
    3
    0 Votes
    3 Posts
    746 Views
    R
    Thank you! That worked. it would update the maintenance tool. However it still would show the message for updating the maintenance tool. Somehow it moves to the next window only if you resize. Thanks a lot.
  • Some details of using QHostInfo::lookupHost

    Unsolved
    5
    0 Votes
    5 Posts
    738 Views
    Pablo J. RoginaP
    @Mihan said in Some details of using QHostInfo::lookupHost: then I use QHostInfo::lookupHost("8.8.7.8",this, SLOT(receiver2()), can it return the error. Have you checked the code snippet from QHostInfo::lookupHost() documentation? You have an example there how to check for error...
  • Deploy to remote and run in terminal (as root!)?

    Unsolved cross compile raspberry pi root deploy term
    2
    0 Votes
    2 Posts
    1k Views
    pauleddP
    I somehow workaround it. On the RaspberryPi I created a bash script in /usr/bin: /usr/bin/x5 #!/bin/bash xhost +local: sudo /home/pi/adas0002 --platform xcb I made it executable and then on my Desktop-Pc in Qt-Creator I have "/usr/bin/x5" in "Alternate executable on device". Now my application starts with root even without invoking any terminal. I know this is very bad in security point of view but I dont care on my little offline Raspi...