Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • QUdpSocket can't receive data from specific interface

    Unsolved
    4
    0 Votes
    4 Posts
    434 Views
    Christian EhrlicherC
    I'm pretty sure it's the windows firewall. Try to send to a dedicated adress instead broadcast to see if it helps but QUdpSocket can handle both correctly. See also the examples and try them out: https://doc.qt.io/qt-6/qudpsocket.html#details
  • QSqlTableModel resize on edit

    Unsolved
    6
    0 Votes
    6 Posts
    427 Views
    Seb TurS
    @JonB Thanks for the proposed solution , I will give it a try.
  • This topic is deleted!

    Unsolved
    2
    0 Votes
    2 Posts
    3 Views
  • Error while making example file

    Unsolved
    15
    0 Votes
    15 Posts
    3k Views
    C
    @ferocito The file is built as one of the plugins in the Plug & Paint example. The example code is here and the specific sub-project that builds the library is at plugins/basictools/basictools.pro $ cd ~/Qt/Examples/Qt-6.4.2/widgets/tools/plugandpaint $ qmake $ make ... $ ls -F . plugins .: app/ CMakeLists.txt Makefile plugandpaint* plugandpaint.pro plugins/ plugins: basictools/ CMakeLists.txt extrafilters/ libpnp_basictools.a libpnp_extrafilters.so* Makefile plugins.pro
  • Importing existing project on qt design studio

    Unsolved
    3
    1 Votes
    3 Posts
    636 Views
    E
    I would also be interested in this. What is the workflow when Qt Design Studio should be used long after the Qt development started, so already a number of (cmake-based) Qt projects exist already? Can they be imported somehow?
  • How to retrieve data from an excel .csv file, and put it in a graph with QCustomPlot

    Unsolved
    34
    0 Votes
    34 Posts
    10k Views
    S
    You need to learn to read error messages more thoroughly. @Raphawel said in How to retrieve data from an excel .csv file, and put it in a graph with QCustomPlot: C:\Users\46053500\Documents\Graph_QT\graphConso\graphconso.cpp:140: error : no matching function for call to 'QCPGraph::setData(QVector<char>&, QVector<double>&)' ui->customplot->graph(0)->setData(xData2, yData2); This error message tells you that the first parameter you are handing in is of type QVector<char>. By now we have established that it should be QVector<double>. You should be able to figure out that you are passing the wrong variable here. @Raphawel said in How to retrieve data from an excel .csv file, and put it in a graph with QCustomPlot: C:\Users\46053500\Documents\Graph_QT\graphConso\graphconso.cpp:125: error : no matching function for call to 'QDateTime::fromString(QStringList&, const char [20])' referenceDateTime = QDateTime::fromString(lineList, "MM/dd/yyyy hh:mm AP"); And again it tells you that the type of the first parameter is QStringList. As the function name implies it wants a QString instead. So, you need to take one element out of the string list to pass to the function. Please have a careful look at the error messages because these ones you are posting are really easy to read and see what's wrong. C++ is a strongly typed language. Learn to use this power to your advantage. The compiler exactly tells you when you are using the wrong type. And it is a lot better to have this information at compile time than to have to figure this out at runtime.
  • QT app crash in Gstremer rtspsrc while calling g_free()

    Solved
    4
    0 Votes
    4 Posts
    379 Views
    D
    Solved the issue by changing gstreamer version to 1.22.0. and deleting libgstd3d11.dll. I guess this issue is due to windows CRT, its not allow to free memory which is allocated by other thread.
  • Is there a way to find out which widget consumed an event?

    Solved
    20
    0 Votes
    20 Posts
    3k Views
    V
    @SGaist said in Is there a way to find out which widget consumed an event?: Aren't you contradicting point 4 of Native Widgets VS Alien Widgets in QWidget's documentation ? Thanks for the clarification, that's exactly what I meant. And after Axel's response I started thinking maybe that is no longer the case in new versions of Qt or something, so it's great we cleared that up
  • Trouble compiling a shared library under linux

    Unsolved
    9
    0 Votes
    9 Posts
    636 Views
    ocgltdO
    @SGaist I will have to do that to clean up the build process. At this points it's more curiosity than anything else. Since I set CONFIG+=ordered in the libs.pro file I assumed that each library .pro would be built in series. Yet it doesn't seem to do so.
  • 0 Votes
    3 Posts
    520 Views
    shenlebantongyingS
    @Chris-Kawa Thank you very much for pointing me to a right direction, and you are absolutely right. I narrowed the problem to the search box's paint event. The cursor blinking is causing the repainting events.
  • QCanBusDevice errors on write

    Unsolved
    1
    0 Votes
    1 Posts
    187 Views
    No one has replied
  • Unable to create QML custom modules in cmake

    Unsolved qml qml modules
    3
    0 Votes
    3 Posts
    682 Views
    A
    @ankou29666 That did not work too. Also, I do have a qrc path
  • Visuals not refreshing unless mouse moves

    Unsolved
    2
    0 Votes
    2 Posts
    430 Views
    Kent-DorfmanK
    @PLL3 Times I've experienced incorrect X11 painting were due to stack or heap corruption.
  • if( QP->waitForFinished(100)) ???

    Unsolved
    3
    0 Votes
    3 Posts
    248 Views
    A
    @Christian-Ehrlicher Unfortunately one has to read more than one sentence. On top of that I have made few logical errors. Just in case it may be of real interest to some - here is the revised BASIC code . There are few issues running "bluetoothctl" command. It responds with its own "wait" - hence it gives false waitForReadyRead. But additional fake 100 mS delay seems to be OK . Then readAllStandardOutput() can be used only ONCE after real waiting for output is done.... { text = "Process single shot "; qDebug() <<text; if (QP->waitForReadyRead(500)) { // READY TO READ // make sure it is all QP->waitForFinished(100); fake delay result = QP->readAllStandardOutput(); qDebug() << result; if(result.isEmpty()) { text = "failed to get any data output "; qDebug() << text; } else analyze output here } else { text = "waitForReadyRead(500) timed out "; qDebug() << text; } text = "Elapsed time "; text += QString::number(time->elapsed()); qDebug() << text; QP->close(); } }
  • Find and highlight a specific row in tableview

    Solved table view focus highlight examples
    8
    0 Votes
    8 Posts
    2k Views
    JonBJ
    @FumbleFingers said in Find and highlight a specific row in tableview: It may not be everyone's favourite coding style, but it works for me. Umm, you assign to idx in the middle of passing a parameter, and then use it afterwards!? :)
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    5 Views
    No one has replied
  • QT 6.4.2 PDF Multipage Viewer and PDF Viewer Examples

    Unsolved
    3
    0 Votes
    3 Posts
    668 Views
    KaguroK
    @SGaist Okay i will try it. Thanks for your help!
  • Chart like Windows Task Manager

    Unsolved chart cpu pyqt pyqt6 pyqt5
    6
    0 Votes
    6 Posts
    1k Views
    SGaistS
    @deltax12 take a look at this stack overflow thread for hints on how do to it.
  • resources management in Qt creator

    Solved
    3
    0 Votes
    3 Posts
    286 Views
    O
    @ankou29666 No and thanks, this solves my issue. part of me feels a bit dumb for not reading the doc properly, and part of me is wondering why this is not automatically added to the generated when the CMakeLists.txt file, since qml projects by default use the resource system ... Thanks.
  • paint custom QTableView row colors

    Unsolved table view item delegate
    5
    0 Votes
    5 Posts
    906 Views
    J
    @JonB I'm still wondering if the right approach would be to use a QItemViewDelegate subclass. I need custom painting of the rows when they come into view based on a global UI setting (colored or normal display) and the content of one of the cells in the row (the threadID). The Star Delegate example seems to indicate that custom cell painting is done via these view delegates. I thought that the way these delegates are supposed to work is that they get called for painting or editing on demand (i.e. when their cells are visible via the scrollbars or double clicked for editing). This way the change from normal to colored rows would refresh the visible view (I don't really need to store the background with each item in the table as it is just for visibility purposes.