Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.3k Posts
  • Dependent Qt6Widgetsd.lib does not exist

    Unsolved
    9
    0 Votes
    9 Posts
    5k Views
    P
    I had the same problem and these were the trials that unblocked me : Check if you have this file in the mentioned location. I had them as .prl and not as .lib . This is due to the dynamically linked libraries instead of the static ones. If you are facing the same issue, follow this page : https://doc.qt.io/qt-5/windows-deployment.html. This creates the .dlls instead of .prls. The other issue I had was the mismatch of Visual Studio version. I uninstalled Qt after I got the libraries to get a clean start. With the updated MingW version, I did not face any issue. @mysondrink try this if you are still stuck.
  • Question about converting from QGLWidget to QOpenGLWindow

    Unsolved
    2
    0 Votes
    2 Posts
    185 Views
    Christian EhrlicherC
    @rock37 You want QOpenGLWidget, not window I would guess.
  • qt 6.7.0 to 32 bits plataforms

    Unsolved
    14
    0 Votes
    14 Posts
    2k Views
    J
    @ChrisW67 These are the parameters I use to compile to 32 ./configure.bat -platform win32-g++ -release -static -prefix "C:\Qt\6.7.0\mingw_x32_dro_static" -opensource -confirm-license -make libs -nomake tools -nomake examples -nomake tests ...... Is it like that or am I doing something wrong?
  • Why Slot is not getting called when timer is timeout

    Unsolved
    10
    0 Votes
    10 Posts
    726 Views
    N
    @JonB I added a debug point.
  • Qss Slider Question

    Unsolved
    4
    0 Votes
    4 Posts
    529 Views
    JoeCFDJ
    @hunter-Li https://doc.qt.io/qt-6/stylesheet-examples.html#customizing-qslider and https://stackoverflow.com/questions/38071131/how-to-adjust-a-qsliders-handle
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    16 Views
    No one has replied
  • How to reconnect signal to slot after object change?

    Unsolved
    2
    0 Votes
    2 Posts
    202 Views
    Christian EhrlicherC
    @Rozerchik said in How to reconnect signal to slot after object change?: So, will it be right like this? Yes
  • QT6 Can't read the OUT parameter from MYSQL Database

    Solved
    6
    0 Votes
    6 Posts
    505 Views
    R
    @Christian-Ehrlicher thank You very much
  • :-1: error: gstreamer-1.0 development package not found

    Solved
    13
    0 Votes
    13 Posts
    3k Views
    V
    @SGaist thank you..
  • Preserve windows 10 style

    Unsolved
    4
    1 Votes
    4 Posts
    391 Views
    S
    @ChrisW67 https://learn.microsoft.com/en-us/windows/win32/api/dwmapi/nf-dwmapi-dwmsetwindowattribute I don't do so much windows dev these days but I seem to recall you could also control this with those manifest files.
  • QTreeView how to support move action?

    Unsolved
    17
    0 Votes
    17 Posts
    1k Views
    S
    @JonB Yes but i can't get it to work by handling the methodes in the model directly. Instead i may gonna do this by accesing the model trough my QTreeView Drag and Drop Events. This seems way easier to me. void ViewLayerList::dragMoveEvent(QDragMoveEvent *event) { QTreeView::dragMoveEvent(event); QModelIndex belowIndex; // Überprüfen Sie die Position des Drop-Indikators QAbstractItemView::DropIndicatorPosition position = dropIndicatorPosition(); // Bestimmen Sie das Aussehen des Drop-Indikators basierend auf seiner Position switch (position) { case QAbstractItemView::AboveItem: case QAbstractItemView::BelowItem: qDebug() << "Drop AboveItem or BelowItem"; DropOnItem = false; // Holen Sie sich den QModelIndex des Elements unterhalb der aktuellen Position belowIndex = indexAt(event->position().toPoint() + QPoint(0, 1)); if (belowIndex.isValid()) { // Holen Sie sich die Zeile des Elements RowBelowDropPositon = belowIndex.row(); qDebug() << "Row of item below: " << RowBelowDropPositon; } //AN AI HIER BEKOMME ICH IMMER EIN VERBOTEN SCHILD UND KANN ES NICHT DROPPEN event->acceptProposedAction(); break; case QAbstractItemView::OnItem: qDebug() << "Drop OnItem"; DropOnItem = true; break; case QAbstractItemView::OnViewport: qDebug() << "Drop OnViewport"; break; } } void ViewLayerList::dropEvent(QDropEvent *event) { if(DropOnItem == false){ } QTreeView::dropEvent(event); } But i don't know if it has many downsides compared to doing this in the model directly. Thats what my question was to @SGaist
  • How to Resolve the QMediaPlayer Resource Error?

    Unsolved
    3
    0 Votes
    3 Posts
    1k Views
    Y
    See also: https://bugreports.qt.io/browse/QTBUG-110708 https://bugreports.qt.io/browse/QTBUG-111910 Qt 6.5.1 may be sufficient to resolve the bug.
  • How to overlay transparent areas on a video widget

    Unsolved
    3
    0 Votes
    3 Posts
    498 Views
    Q
    @jsulm not work when they have same parent #pragma once #include <QWidget> #include <QQuickWidget> #include "VideoWidget.h" #include "OpenGLWidget.h" class MyWidget: public QWidget { public: MyWidget(QWidget *parent); void SetSubWidget(); }; #include "Mywidget.h" MyWidget::MyWidget(QWidget* parent) : QWidget(parent) { this->setGeometry(0,0, 1920, 1080); this->setWindowFlags(Qt::FramelessWindowHint); QPalette palette; palette.setColor(QPalette::Window, Qt::GlobalColor::black); this->setAutoFillBackground(true); this->setPalette(palette); this->show(); } void MyWidget::SetSubWidget() { VideoWidget* videoWidget = new VideoWidget(this); videoWidget->setGeometry(0, 0, 512, 384); QPalette palette1; palette1.setColor(QPalette::Window, Qt::GlobalColor::red); videoWidget->setAutoFillBackground(true); videoWidget->setPalette(palette1); videoWidget->show(); // not work QWidget* transparentWidget1 = new QWidget(this); transparentWidget1->setGeometry(0, 0, 100, 100); transparentWidget1->show(); // work QWidget* transparentWidget2 = new QWidget(nullptr); transparentWidget2->setAttribute(Qt::WA_TranslucentBackground, true); transparentWidget2->setWindowFlags(Qt::FramelessWindowHint); transparentWidget2->setGeometry(100, 100, 100, 100); transparentWidget2->show(); // work QWidget* transparentWidget3 = new QWidget(videoWidget); transparentWidget3->setGeometry(200, 200, 100, 100); transparentWidget3->show(); } #pragma once #include <QWidget> #include <mpv/client.h> class VideoWidget : public QWidget { Q_OBJECT public: VideoWidget(QWidget* parent); private: mpv_handle* mpv; }; #include "VideoWidget.h" VideoWidget::VideoWidget(QWidget* parent) :QWidget(parent) { mpv = mpv_create(); if (!mpv) { qDebug() << "could not create mpv context"; throw std::runtime_error("could not create mpv context"); } int64_t wid = this->winId(); mpv_set_property(mpv, "wid", MPV_FORMAT_INT64, &wid); qDebug() << "wid is " << wid; mpv_set_property_string(mpv, "hwdec", "auto"); mpv_set_property_string(mpv, "loop-file", "inf"); if (mpv_initialize(mpv) < 0) { qDebug() << "could not initialize mpv context"; throw std::runtime_error("could not initialize mpv context"); } const char* args[] = { "loadfile", "4k_60.mp4", NULL }; mpv_command_async(mpv, 0, args); } #include <QWidget> #include "Mywidget.h" #include <QApplication> #include <QTimer> int main(int argc, char *argv[]) { QApplication app(argc, argv); MyWidget *mywidget = new MyWidget(nullptr); QTimer::singleShot(2000, mywidget, [&]() { mywidget->SetSubWidget(); }); return app.exec();; } [image: 1710fca3-7a84-4b57-a4e0-403fbe919762.png]
  • Error when importing QJsonDocument

    Unsolved
    3
    0 Votes
    3 Posts
    427 Views
    C
    @Creaperdown said in Error when importing QJsonDocument: error: call to consteval function 'std::chrono::hh_mm_ss::_S_fractional_width' Googling the error message gives a range of similar messages. The general theme seems to be that older clang and libstdc++ (13) versions clash. See https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1918839.html for example.
  • Qt5 Windows program can't find a procedure entry point

    Solved
    4
    0 Votes
    4 Posts
    904 Views
    R
    @ChrisW67 Solved. Turns out it was using the wrong version of libstdc++-6.dll; used the one that came with qt, and that didn't have the "throw_bad_array_new_length" entry point. Used the one that came with mingw, and that fixed it.
  • FullScreen prevents showing the sub menu bar

    Unsolved widget fullscreen menubar
    6
    0 Votes
    6 Posts
    2k Views
    H
    Same problem here with QPushButton's menu. Qt 5.14.1, Mingw, Windows 10, Windows 11. and some interest thing is that when I use an application to record my screen, it's showing the menu!!!!!! (checked the video of screen), but I can't see when interacting :|
  • QMenu turns invisible when switch monitors on Win10

    Unsolved
    2
    0 Votes
    2 Posts
    176 Views
    SGaistS
    Hi, Qt 5.12.0 being old and obsolete, the first thing to do would be to test with a more recent version either the latest 5.15 or Qt 6.
  • Move a class that inherits from QObject with all it objects members to QThread

    Unsolved
    8
    0 Votes
    8 Posts
    1k Views
    Pl45m4P
    @Lior said in Move a class that inherits from QObject with all it objects members to QThread: the worker is act as object when it get the the event and i not fully understend the relation between qthread and signal-slot mechanisem. It's explained in the article linked by @jsulm here as well as in the documentation pages here https://doc.qt.io/qt-6/threads-qobject.html#signals-and-slots-across-threads and when object is created its owner is the thread it created it. Therefore you move it and make members a child of the moved object or create them later after your object was moved
  • QPushButton border color

    Solved
    2
    0 Votes
    2 Posts
    1k Views
    JonBJ
    @Grand_Titan I think you have a problem. Elements have an in-built style. As soon as you place any CSS on them they lose this, that's why you see it look so different. You may find you can only change that in code (QStyle, QPalette), not via CSS.
  • Open new windows that needs to be closed to use others

    Solved
    3
    0 Votes
    3 Posts
    189 Views
    A
    @jsulm Thanks, you gave me anyway the correct suggestion: the modal property of a window.