Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.3k Posts
  • Rendering FHD images as video

    Solved
    9
    1 Votes
    9 Posts
    980 Views
    N
    @SGaist said in Rendering FHD images as video: You can create it once and then update its content. I've done that. Something kinda like this: void initializeGL() override { initializeOpenGLFunctions(); m_tex = new QOpenGLTexture(QOpenGLTexture::Target::Target2D); m_tex->create(); m_tex->setSize(4000, 4000); // Maximum possible frame resolution m_tex->setFormat(QOpenGLTexture::RGBA8_UNorm); m_tex->allocateStorage(QOpenGLTexture::RGBA, QOpenGLTexture::UInt8); m_tex->bind(1); } void paintGL() override { QImage *img = this->GetCurrentImageFrame(); m_tex->setData(0, 0, 0, img->width(), img->height(), 1, 0, QOpenGLTexture::RGBA, QOpenGLTexture::UInt8, img->constBits()); } But there are no performance improvement. I guess 30 FPS is the maximum my machine can do, so I would just move on with it. Maybe I will implement a toggle so user with more powerful machine can run it in 60 FPS. I will now close the thread, thanks for everyone helping.
  • Building help files for use with Qt Assistant

    Unsolved
    1
    0 Votes
    1 Posts
    102 Views
    No one has replied
  • Resurrecting a dormant Qt project - Suggestions? / Advice?

    Unsolved
    3
    0 Votes
    3 Posts
    346 Views
    T
    Thanks so much! Your response is awesome!
  • on Dialog box show() is not working but exec() is

    Unsolved
    15
    0 Votes
    15 Posts
    1k Views
    Pl45m4P
    @rupertrupert said in on Dialog box show() is not working but exec() is: after my main window is closed Usually your program would end at this point... Post the related code then... this isn't a Q&A game here. We can't see what your are doing exactly
  • How to pass QSqlRelationalTableModel object to a class constructor (from main.cpp)

    Unsolved
    4
    0 Votes
    4 Posts
    358 Views
    Pl45m4P
    @Gandalf404 said in How to pass QSqlRelationalTableModel object to a class constructor (from main.cpp): I just trying do not create unnecessary objects of QSqlRelationalTableModel, so i thought better just pass it through widgets Like I've said, create it in your widget where you need it. That would make one instance only. Or for what reason you need it in main()?
  • How to change record's fields in beforeInsert()?

    Unsolved
    10
    0 Votes
    10 Posts
    804 Views
    JonBJ
    @Mark81 I have not checked, but isn't the new row and its record only inserted into the in-memory model at this point, it has not yet been inserted into the backend database? You can still edit/change it in code, before the user performs any edits, and it is not committed until you move off that new row?
  • How to set a color scheme for a QMainWindow?

    Solved
    6
    0 Votes
    6 Posts
    684 Views
    SGaistS
    I would expect to have somewhere a list of the platform where the value is in use. I haven't checked all the platform backends. Just the Linux ones where I haven't seen the value in use.
  • Selection in Qt

    Solved
    2
    0 Votes
    2 Posts
    250 Views
    JonBJ
    @Carlosyoot selectionBehavior : SelectionBehavior enum QAbstractItemView::SelectionBehavior selectionMode : SelectionMode enum QAbstractItemView::SelectionMode
  • Title: QLineEdit in Linux Qt App Not Triggering Chinese Input (IBus)

    Unsolved
    2
    0 Votes
    2 Posts
    197 Views
    JoeCFDJ
    check dependencies ldd path/libibusplatforminputcontextplugin.so export QT_DEBUG_PLUGINS=1 to check if this plugin is loaded or run strace your_app to check if the plugin is loaded correctly. rebuild Qt with flag: -ibus from the source
  • cmake --build

    Locked Unsolved
    3
    0 Votes
    3 Posts
    345 Views
    Christian EhrlicherC
    Closed as dupe of https://forum.qt.io/topic/161241/error-while-building-qt-6-8-2-from-source/
  • Error while Building Qt 6.8.2 from Source

    Unsolved
    14
    0 Votes
    14 Posts
    2k Views
    jsulmJ
    @dan1973 said in Error while Building Qt 6.8.2 from Source: i want to install qt 6.2.8 in my folder D:\dev\Qt\Qt6 This does not answer @Christian-Ehrlicher questions... First: do not build inside visual studio installation directory. Second: are you sure you have to build Qt by yourself instead of using Qt Online Installer to install Qt?
  • Does QDir impose a maximum path limit on Windows?

    Solved qdir createfile path limit
    4
    0 Votes
    4 Posts
    3k Views
    kshegunovK
    Shouldn't, but I don't know. As far as links go, these seem to point to a newer version of the code. Bear in mind the original post was 7 years ago ...
  • Unable to control camera aperture on Raspberry Pi

    Unsolved
    5
    0 Votes
    5 Posts
    538 Views
    SGaistS
    Since you are using Q5, it's the GStreemer plugin that you should check.
  • 0 Votes
    4 Posts
    350 Views
    Christian EhrlicherC
    And what has Qt to do with this? This is a normal windows behavior: https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order
  • Github Copilot Sign In button Grey - QT Creator 15.0.1

    Unsolved
    4
    0 Votes
    4 Posts
    577 Views
    aha_1980A
    Hi @Panda-Pilot, as stated in the bugreport, using an older version 1.41.0 of Copilot.vim should also work. Regards
  • QFileDialog::getOpenFileName causing program to crash

    Unsolved
    26
    0 Votes
    26 Posts
    10k Views
    V
    @VirtualFloat Does the crash occur in a Qt .dll, or inside a foreign dll injected by some security software? The latter is, unfortunately, not uncommon.
  • macOS: sandboxing is breaking ability to build&run?

    Unsolved
    2
    0 Votes
    2 Posts
    162 Views
    D
    i tried signing the app each time but that didn't fix it
  • How to access raw value of foreign key?

    Unsolved
    2
    0 Votes
    2 Posts
    210 Views
    M
    @Mark81 said in How to access raw value of foreign key?: Even if the printed filter values are correct, the rowCount() is always 0. This was simple: m->setFilter(QString("%1='%2'").arg(r.displayColumn(), displayValue)); did the trick. Followed by: qDebug() << m->data(m->index(0, m->fieldIndex(r.indexColumn()))); seems to solve the issue. Is my approach correct or is there anything better?
  • Using macros cannot resolve recursive references either.

    Unsolved
    12
    0 Votes
    12 Posts
    1k Views
    S
    Headers alone don't do anything. Suppose you have a classb.cpp that just includes classb.h. This header first declares the macro CLASSB_H. Then you go on to include all_header.h from classb.h. This first includes classb.h followed by classa.h. However, when including classb.h from all_header.h (included from classb.h) CLASSB_H is already defined and the inclusion returns nothing. So far, ClassB has not been defined. Then you go on including classa.h which expects a full definition of ClassB. This problem only occurs when including classb.h (before any of the other two headers). It is not a problem when including classa.h or all_header.h (first). Using all_header.h as a pre-compiled header will include all_header.h before everything else in every translation unit. That's why this solution works. But IMHO this is not a proper solution because source code should always also compile without precompiled headers. Especially in this scenario a change in ClassA or ClassB will trigger a recompile of the precompiled header and thus a recompile of your whole project. This is not a tenable solution for large projects. Precompiled headers should be reserved for third-party libraries that (almost) never change. It is not meant for your own source code. (Precompiled headers are supposed to reduce compilation times and not increase them.) I am not sure what a good solution to this problem is. Most likely it works by removing the include guards for all_header.h. I believe these are (in this specific context) not actually needed.
  • Qt maintenance tool problem

    Unsolved
    2
    0 Votes
    2 Posts
    200 Views
    jsulmJ
    @GeoMa said in Qt maintenance tool problem: I tried changing url using -- mirror https://download.qt.io/official_releases with no success Did you try any other mirrors from the mirror list?