Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.1k Topics 454.7k Posts
QtWS25 Last Chance
  • Updating main QT application using updater application

    Unsolved
    14
    0 Votes
    14 Posts
    747 Views
    L
    Yep you were totally right. I was testing this while running my application in debug mode. If I just simply run the application then it will work without any issues!
  • No data supplied for parameters in prepared statement"

    Solved
    9
    0 Votes
    9 Posts
    810 Views
    A
    @Christian-Ehrlicher fixed, im used old mysql, update mysql and the problem clear
  • Windows Deployment

    Solved
    19
    0 Votes
    19 Posts
    690 Views
    B
    @aha_1980 Actually I mean using Dependency Walker to check libmysql.dll :)
  • How to set a native Qt theme in Qt 5.15.9 on GNOME?

    Solved
    5
    0 Votes
    5 Posts
    2k Views
    R
    I figured out a solution that did not require any new version of QT or messing with the libraries. Setting the environment variable XDG_CURRENT_DESKTOP=kde did the trick. I have yet to test with the Qt4 version, but since it works for Qt5 and that was my original question I am marking this solved.
  • QT Designer/ slot method/ py script help

    Unsolved
    4
    0 Votes
    4 Posts
    161 Views
    SGaistS
    You're welcome ! Since your question is answered, please mark the thread as solved using the cog button or the three dot menu beside the answer you deem correct so other forum users may know a solution has been found :-)
  • How to implement the clone formatting functionality of a word processor?

    Unsolved
    13
    0 Votes
    13 Posts
    826 Views
    artwawA
    @ntos if it's too long for the forum post you can use PastBin . com?
  • Warnings for QKeyCombination deprecation after Qt6

    Solved deprecated qkeycombination
    6
    0 Votes
    6 Posts
    348 Views
    J
    It wasn't really clear to me that using Qt::CTRL | Qt::ALT is still part of the usage. With that, the problem makes a lot more sense. Qt::Key_R | Qt::CTRL | Qt::ALT evaluates to (Qt::Key_R | Qt::CTRL) | Qt::ALT, which results in QKeyCombination | Qt::ALT, which is what's raising the warning, since QKeyCombination does not have any (non-deprecated) operators itself. Qt::CTRL | Qt::ALT | Qt::Key_R instead evaluates to (Qt::CTRL | Qt::ALT) | Qt::Key_R, which results in Qt::Modifiers | Qt::Key_R, which is an operation that is defined. This is kinda the answer I was looking for.
  • 1 Votes
    17 Posts
    35k Views
    D
    @Qterry-wang wow I was also getting similar warning and i deleted parameter like you, warning was gone. THX !
  • Child widget steals parent widget's focus

    Unsolved
    3
    0 Votes
    3 Posts
    263 Views
    Pl45m4P
    @Richard-Hendricks said in Child widget steals parent widget's focus: What do I do if I want to make a floating widget as a part of the parent widget while it does not steal the parent's focus? Maybe QMdiSubWindow inside a QMdiArea? https://doc.qt.io/qt-6/qmdisubwindow.html#details Or some container widget? Like QStackedWidget / QTabWidget?
  • gtk segmentation faults in Qt4/Qt5 application upgraded to Red Hat 9

    Unsolved
    4
    0 Votes
    4 Posts
    242 Views
    R
    Ok, this is actually unrelated to the style. I assumed it was due to the backtrace containing references to gtk and the application being in a gtk style, but every other style gives the same result. Why is Qt calling gtk libraries in the background? I assumed it was completely separate from gtk since they're both different tools to do the same thing. Does Qt have to use gtk in gnome environments?
  • How to get lyrics in qt6 with QMediaMetaData ?

    Unsolved
    2
    0 Votes
    2 Posts
    143 Views
    SGaistS
    Hi, That's surprising indeed. Did you already check the bug report system ?
  • 0 Votes
    9 Posts
    306 Views
    enjoysmathE
    My last solution worked. Replace with QListWidget and set its ItemDelegate in the same way. Result: [image: 9b8c9873-c1de-4716-9db3-4a84abd7e163.png]
  • error: C2027: use of undefined type 'Ui::MainWindow'

    Solved
    11
    0 Votes
    11 Posts
    6k Views
    enjoysmathE
    Only way to fix this is to recreate your whole project, dropping in all your source files. At least this gives you an excuse to re-organize your folder structure. This is my second time encountering it and organizing is what I plan to do. Okay, I was able to fix this by renaming (in QtDesigner to MainWindowClass), compiling, error still there. Rename again to MainWindow. Compile, more errors. Then finally rename it back to MainWindowClass. Save in Qt Deigner. Clean build in VS and rebuild. Errors now gone. VS sucks.
  • How to update gui and render to opengl simultaneously without stutter

    Unsolved
    1
    0 Votes
    1 Posts
    102 Views
    No one has replied
  • Qt Multimedia Issues

    Unsolved
    5
    0 Votes
    5 Posts
    446 Views
    D
    @JoeCFD Thank you, it does seem to be a Qt issue with Gnome. I had issues with QVideoWidget, QWidget::createWindowContainer and QColorDialog::getColor corrupting the rendering of my application. Out of desperation I switched everything to KDE and it works as expected. The raspberrypi was my fault and fixed it by explicitly specifying the backend
  • QTableWidget Stylesheet Border Radius Issue

    Unsolved
    1
    0 Votes
    1 Posts
    202 Views
    No one has replied
  • New to QT and getting error: "Could not resolve SDK Path for 'macosx10.11"

    Unsolved
    5
    0 Votes
    5 Posts
    5k Views
    artwawA
    Hi @YianniX To add to what @SGaist asks: you need Xcode and CLT once installed please run Xcode, it will pop out a license you need to acknowledge, otherwise Qt will throw error "can't find path" to something CLT related and advise you to run Xcode path select (which you need anyway but that license thing is annoying). Once you verified the above please try again and let us know the outcome :)
  • How do I use the signal parameter in the slot?

    Solved
    5
    0 Votes
    5 Posts
    335 Views
    J
    In the end, I used this way to achieve it. I cant to write a template that can accommodate any number of parameters. template <typename T> struct lambda_traits : lambda_traits<decltype(&T::operator())> {}; template <typename ClassType, typename ReturnType, typename... Args> struct lambda_traits<ReturnType(ClassType::*)(Args...) const> { static const std::size_t arity = sizeof...(Args); using Tuple = std::tuple<Args...>; }; class Debounced { public: template <typename Func1, typename Func2> static inline typename std::enable_if<lambda_traits<Func2>::arity == 0, QMetaObject::Connection>::type connect(const typename QtPrivate::FunctionPointer<Func1>::Object* sender, Func1 signal, const QObject* context, Func2 slot, Qt::ConnectionType type = Qt::AutoConnection) { QTimer* timer = new QTimer((QObject*)context); timer->setSingleShot(true); QObject::connect(sender, signal, timer, [=]() { timer->start(200); }); return QObject::connect(timer, &QTimer::timeout, context, std::move(slot), type); } template <typename Func1, typename Func2> static inline typename std::enable_if<lambda_traits<Func2>::arity == 1, QMetaObject::Connection>::type connect(const typename QtPrivate::FunctionPointer<Func1>::Object* sender, Func1 signal, const QObject* context, Func2 slot, Qt::ConnectionType type = Qt::AutoConnection) { QTimer* timer = new QTimer((QObject*)context); timer->setSingleShot(true); using ParamType0 = std::tuple_element<0, lambda_traits<Func2>::Tuple>::type; ParamType0* p0 = new ParamType0; QObject::connect(sender, signal, timer, [=](ParamType0 p) {*p0 = p; timer->start(200); }); return QObject::connect(timer, &QTimer::timeout, context, [=]() {slot(*p0); }, type); } }; #include <QApplication> #include <QTimer> #include <QSlider> #include <QDoubleSpinBox> int main(int argc, char* argv[]) { QApplication app(argc, argv); auto w = new QWidget(); auto sl = new QSlider(w); auto dsp = new QDoubleSpinBox(w); w->show(); sl->move(10,30); w->resize(50, 200); Debounced::connect(sl, &QSlider::valueChanged, sl, []() {printf("222 "); }); Debounced::connect(sl, &QSlider::valueChanged, sl, [](int v) {printf("%d ", v); }); Debounced::connect(dsp, QOverload<double>::of(&QDoubleSpinBox::valueChanged), dsp, [](double v) {printf("%f ", v); }); return app.exec(); }
  • QtMultimedia cannot be deployed on Qt 6.6.1

    Unsolved
    2
    0 Votes
    2 Posts
    559 Views
    H
    It works in release mode, but not in debug mode. The latest version is the same
  • network request will always timeout with a long time server return?

    Unsolved
    6
    0 Votes
    6 Posts
    312 Views
    N
    Qt network cannot keep alive.I 'm not sure of this,butI didn't find the attribute to set with. I change to use lib curl .libcurl perform well. Forum admin ,you can end this topic.