Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.6k Posts
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    8 Views
    No one has replied
  • Cannot cross compile xcb error

    Unsolved
    2
    0 Votes
    2 Posts
    449 Views
    SGaistS
    Hi, The library is one thing but do you have the development version of these dependencies in the sysroot ?
  • QImage and OpenCV Mat problem

    Solved
    12
    0 Votes
    12 Posts
    3k Views
    Christian EhrlicherC
    @wrosecrans said in QImage and OpenCV Mat problem: Most in-memory image formats for other API's are densely packed (at least by default). Then you should never decode a video stream with ffmpeg... Images in video streams are normally 32 byte aligned nowadays to perfectly match to cpu vector instructions and caches. The only thing I miss in QImage is to be able to specify this alignment in the ctor like e.g. av_image_alloc() allows.
  • How to add one parameter to the clicked SIGNAL?

    Solved slots signal & slot signal event-handling array
    19
    0 Votes
    19 Posts
    24k Views
    Pl45m4P
    @illud Do you think after 6 years, he's still looking for a solution? ;-) The topic is marked "solved" anyway :-)
  • Cant build QMYSQL driver on Ubuntu 22.04.2 LTS

    Solved
    6
    0 Votes
    6 Posts
    1k Views
    JonBJ
    @SaadAli said in Cant build QMYSQL driver on Ubuntu 22.04.2 LTS: The only thing that happened after installing it was I got the file libqsqlmysql.so on my machine. Yep that's fine, it must be supplied in libqt5sql5-mysql package and that is what is needed.
  • Qt Translation text not loading

    Solved
    9
    0 Votes
    9 Posts
    2k Views
    Christian EhrlicherC
    @AkashPatel28 Then please mark this topic as solved, thx.
  • Reciving data from barcode scanner

    Solved
    14
    0 Votes
    14 Posts
    2k Views
    Christian EhrlicherC
    @Damian7546 said in Reciving data from barcode scanner: receivedData.append(scannedData); if(receivedData.contains("\r\n")) parseRecivedData(); Why do you read it line by line just to append it to a QByteArray and split it again afterwards?
  • This topic is deleted!

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

    Unsolved
    6
    0 Votes
    6 Posts
    26 Views
  • Where is QtInterfaceFramework and QIfPendingReply?

    Unsolved
    2
    0 Votes
    2 Posts
    199 Views
    SGaistS
    Hi and welcome to devnet, You can find the module sources here.
  • Getting mouse events with QCalendarWidget

    Unsolved qcalendarwidget
    3
    0 Votes
    3 Posts
    2k Views
    S
    Not QTableView You should use findChild<QTableView*>("qt_calendar_calendarview")->viewport()->installEventFilter(this);
  • how to set qml chartview grid invisible

    Unsolved
    1
    0 Votes
    1 Posts
    270 Views
    No one has replied
  • QWidget empty despite having children

    Unsolved
    5
    0 Votes
    5 Posts
    439 Views
    Christian EhrlicherC
    @DenizCaglar said in QWidget empty despite having children: I've seen some parts of the Qt documentation mention that particular functions take ownership of their pointer arguments This has nothing to do with my comment. I was refering to the parent-child relationship of QObjects
  • 0 Votes
    4 Posts
    331 Views
    JonBJ
    @Daemonitas Well, nearly everything in Qt is done with them, so suggest you read that linked page, and then read it again once finished :) Then apply to your case (e.g. "press add" will raise a signal, you will want a slot on that, and do whatever you want there).
  • This topic is deleted!

    Unsolved
    6
    0 Votes
    6 Posts
    52 Views
  • 0 Votes
    3 Posts
    266 Views
    JonBJ
    @the-woft Nobody can help you from this description. The link you provide tells you what to do, and also shows it seems that OP had a fault in the program launched. Show the exact command and code you are using. Confirm your OS. There will be no misbehaviour in Qt code, only in what you pass to it and how you handle it.
  • using QTimer

    Solved qthread widget applicat c++ timer
    3
    0 Votes
    3 Posts
    804 Views
    D
    @Dean21 I just figured this out myself and am just posting in case someone else has the same issue. My function where I want the timer now looks like shown below: QObject::connect(&client, &QMMqttClient::onMessageReceived, [this](const QString &topic, const QByteArray &msg) { ui->Alarm_Triggered_Label->setText("Temperature alarm of PSU triggered, HV output disabled for 5 minutes"); ui->HV_ON_OFF_Button->setEnabled(false); // Use QMetaObject::invokeMethod to execute the code in the main GUI thread QMetaObject::invokeMethod(this, "publishAfterDelay", Qt::QueuedConnection); }); And the call to function publishAfterDelay() looks like shown below: void Widget::publishAfterDelay() { QTimer::singleShot(3000, this, [this]() { client.publishMesage("Alarm_5_min_cooldown_complete", "1"); qDebug() << "timer pinged"; }); } Hope this helps anyone else.
  • QApplication Crashed ..

    Unsolved
    4
    0 Votes
    4 Posts
    378 Views
    JonBJ
    @ChrisW67 Well not as show it is not, the second line in the constructor just uses the one declared in the .h file? Nonetheless, until we see actual code we don't know and it might well be that in fact the second one has a declaration in the constructor as you say....
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    20 Views
    No one has replied
  • How to receive data in order from TCP server ?

    Solved
    4
    0 Votes
    4 Posts
    803 Views
    Kent-DorfmanK
    @TokaraForest In addition to @JonB comments, understand that TCP is always "in order" because it is a stream transport. data is possibly fragmented by the network but is received and assembled in its transmitted order. You don't see the latter parts of the stream until all previous chunks have been received and inserted in the buffer. It seem what you're really asking about is transaction ordering, and that's up to the application as to how you do it. Please make sure to well define a transaction for your protocol. Ambiguities in the "state machine" between client and server will bite you.