Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • error: undefined reference to `__imp_WSAStartup'

    Unsolved winsock windows10 qt 6.6
    29
    0 Votes
    29 Posts
    8k Views
    Christian EhrlicherC
    @Ketan__Patel__0011 What are you discussing here? The op already used this three days ago... target_link_libraries(eccoci PRIVATE ws2_32)
  • 0 Votes
    26 Posts
    6k Views
    A
    @jsulm it worked, thanks
  • Issue with GUI screen switching in Python QT5 code

    Unsolved
    4
    0 Votes
    4 Posts
    279 Views
    SGaistS
    @greenelephant isn't the goal of your WindowManager class to switch between widgets ? That's exactly what QStackedWidget does, you put all the widgets you want in it and then set the one you want to see. Basically, you should have one main widget that manages that and your other widgets should just use a signal that the manager should handle to change to another widget. They should know nothing about the manager itself, it's not their role.
  • QMediaRecorder (Qt Multimedia) .avi file format problem (FPS)

    Unsolved qtmultimedia qmediarecorder avi
    4
    0 Votes
    4 Posts
    563 Views
    SGaistS
    @Olivier-Duguay can you update to a more recent version of Qt ? Since 6.5, the default backend has been switched to ffmpeg which may give better results.
  • hide/unhide rows in QTableView: use QSqlTableModel or QSqlQuery?

    Unsolved
    2
    0 Votes
    2 Posts
    299 Views
    Christian EhrlicherC
    Or use a QSortFilterProxyModel
  • preferred usage of QSortFilterProxyModel

    Solved
    5
    0 Votes
    5 Posts
    535 Views
    mzimmersM
    After doing a little more reading (and experimentation), I realize that the behavior I described above is actually intended. I suppose if my model was large, this could present a concern, and I'd have to dynamically enable/disable the proxies depending on where I am in my application, but for this application, it seems to be OK. Thanks to all who helped.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    8 Views
    No one has replied
  • Is QList out-of-scope when function returns?

    Solved stack qt6 out-of-scope calculatelayout
    5
    0 Votes
    5 Posts
    652 Views
    E
    @JonB Thanks for the explanation.
  • Finding the "snap point" for a splitter ?

    Solved
    15
    0 Votes
    15 Posts
    2k Views
    S
    @Bonnie Thanks, the horizontal stretch factor seems to get me closest to what I want.
  • Can you set border to QVBoxLayout

    Unsolved
    7
    0 Votes
    7 Posts
    2k Views
    L
    @jsulm You are right. I can place the widgets in the QFrame. I also had to ensure the widget is set to Vertical layout: [image: 30994671-2ac5-454f-82d1-b0ff621d1932.png] Result: [image: 8555d104-1cd8-406a-a38b-69ee160ee2a3.png]
  • Failed to find required Qt component "SerialPort"

    Solved
    6
    0 Votes
    6 Posts
    1k Views
    J
    @J-Hilk Hi, I am kind of new to Qt and seems I am missing some essentials. It worked thank you very much.
  • This topic is deleted!

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

    Unsolved
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • Overriding QCustomPlot library method with your own method

    Unsolved
    12
    0 Votes
    12 Posts
    858 Views
    jsulmJ
    @lukutis222 Then add them in code
  • Undocumented automatic metatype registration in Qt6?

    Unsolved metatype signals & slots qvariant qt6
    6
    0 Votes
    6 Posts
    2k Views
    L
    @oblivioncth same here. Neither Macro nor register function needed. no related documents.
  • Facing issues after upgrading to qt 6.6

    Unsolved qtupgrade qt6
    1
    0 Votes
    1 Posts
    224 Views
    No one has replied
  • C++ Qt Widget app: catch mouse signals from a QPixmap?

    Solved
    3
    0 Votes
    3 Posts
    263 Views
    Pl45m4P
    @Tom-asso Search for "Clickable Label" or something. There is even an entry on Qt Wiki for that: https://wiki.qt.io/Clickable_QLabel Then you just have to use QLabel::setPixmap(yourPixmap) to assign the image to it. Edit: Usually there is no need to "new" a QPixmap. Using a stack variable is sufficient most of the time.
  • where can I change $(Qt_INCLUDEPATH_) meaning?

    Unsolved configuration macros
    3
    0 Votes
    3 Posts
    538 Views
    J
    @Pl45m4 Solution Explorer, right click on the project name -> Qt -> "Upgrade to latest Qt project format version". -- this is no longer an option on the Qt menu!! I have not been able to update Qt_INCLUDEPATH_!
  • Qt 5 + Gstreamer cannot connect to stream

    Solved
    7
    0 Votes
    7 Posts
    669 Views
    S
    @JoeCFD @JoeCFD I have found an Issue! I have used a port 5000 which is blocked on my machine, but only if the request comes not from terminal (No Idea how could it be... :) ). To find it I have used the native approach: #include <gst/video/videooverlay.h> #include <gst/gst.h> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) { ui->setupUi(this); gst_init(NULL,NULL); // getting more information gst_debug_set_active(true); gst_debug_set_default_threshold(GST_LEVEL_INFO); GstElement *pipelineVideoIn = nullptr; GstStateChangeReturn ret; GstElement *source = nullptr; GstElement *capsfilter = nullptr; GstElement *rtpjpegdepay = nullptr; GstElement *jpegdec = nullptr; GstElement *videoconvert = nullptr; GstElement *sink = nullptr; GstCaps *caps; pipelineVideoIn = gst_pipeline_new("pipeline"); source = gst_element_factory_make("udpsrc", "source"); capsfilter = gst_element_factory_make("capsfilter", "capsfilter"); rtpjpegdepay = gst_element_factory_make("rtpjpegdepay", "rtpjpegdepay"); jpegdec = gst_element_factory_make("jpegdec", "jpegdec"); videoconvert = gst_element_factory_make("videoconvert", "videoconvert"); sink = gst_element_factory_make("qtvideosink", "sink"); gst_bin_add_many(GST_BIN(pipelineVideoIn), source, capsfilter, rtpjpegdepay, jpegdec, videoconvert, sink, nullptr); if (!gst_element_link_many(source, capsfilter, rtpjpegdepay, jpegdec, videoconvert, sink, nullptr)) { g_printerr("Elements could not be linked"); } g_object_set(source, "port", 5000, nullptr); caps = gst_caps_from_string("application/x-rtp, media=video, clock-rate=90000, encoding-name=JPEG, payload=96"); g_object_set(capsfilter, "caps", caps, nullptr); gst_caps_unref(caps); // get window handle WId xwinid = ui->videoWidget->winId(); // try to set overlay gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(sink), xwinid); GstStateChangeReturn sret = gst_element_set_state (pipelineVideoIn, GST_STATE_PLAYING); } Unfortunately has this code an another problem, the overlay cannot be set :( and program crushes. But due to gst debug features, it is clear, that the gstreamer cannot connect the given address, because it is "already in use" [image: 551b6863-3000-4f35-8f29-96c748d73c94.png] And after changing of the port on both sides (source and sink), streaming start to work with old application! Ones Again, Thanks @JoeCFD for your Advice's!
  • sql query thread termination

    Unsolved
    4
    0 Votes
    4 Posts
    374 Views
    Christian EhrlicherC
    @Seb-Tur said in sql query thread termination: I do below if (!isInterruptionRequested()) emit queryExecutionFinished(results); // Emit the signal with the results You should do inside the query.next() when there are a lot of rows. but my question is how do I kill the thread stuck at the query.exec() ? simply exit the run() function.