Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
82.9k Topics 453.3k Posts
  • Reporting inappropriate content on the forums

    Pinned Locked
    29
    3 Votes
    29 Posts
    29k Views
    A

    Thank you for the report. I have banned the user, which got rid of the spam posting. Not a loss, as this user did not post any other content on the site. Just deleting this one posting was not possible.

    Thanks for reporting this.

  • Qt Assistant and mouseover

    Unsolved
    2
    0 Votes
    2 Posts
    3 Views
    jeremy_kJ

    It looks like Assistant's display is implemented via QTextBrowser, which makes no mention of javascript or QJSEngine in the documentation. As such, embedded javascript won't work.

    An application could use QTextBrowser::highlighted() to detect the mouseover and alter the underlying document as desired.

  • Rendering FHD images as video

    Solved
    9
    0 Votes
    9 Posts
    124 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
    3 Views
    No one has replied
  • '#' key press not returning Qt::Key_NumberSign on Mac

    Unsolved
    2
    0 Votes
    2 Posts
    15 Views
    jeremy_kJ

    QKeyEvent::text() should return QString("#").

  • App crashes after deployment

    Unsolved
    6
    0 Votes
    6 Posts
    51 Views
    SGaistS

    Hi,

    You can pass additional modules to include to macdeployqt. Add those that are missing currently.

  • Passing data to a new window class.

    Moved Unsolved
    4
    0 Votes
    4 Posts
    59 Views
    D

    @Pl45m4 Thank You for your feedback. I am learning QT and would like to be able to do this;

    void SchedulePanel::on_OrderEntry_PB_clicked() { order *OrderEd; OrderEd = new order (); OrderEd->show(QModelIndex SelectedSchedule); }

    Is That possible?
    Thanks

  • Resurrecting a dormant Qt project - Suggestions? / Advice?

    Unsolved
    3
    0 Votes
    3 Posts
    58 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
    177 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

  • 0 Votes
    4 Posts
    61 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
    131 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?

  • 0 Votes
    4 Posts
    86 Views
    jeremy_kJ

    @jbosak said in QThreadPool not always emitting (custom) finished signal:

    I'm trying to make use of QThreadPool and want to be able to have a signal be emitted when the QRunnable passed in is started and finished.

    This looks like functionality provided by QtConcurrent::run() and QFutureWatcher.

  • How to set a color scheme for a QMainWindow?

    Solved
    6
    0 Votes
    6 Posts
    138 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.

  • Deleting QChart Causes 30+ Second Application Hang!

    Unsolved
    50
    0 Votes
    50 Posts
    2k Views
    JoeCFDJ

    @FleetingMemory They will not fix it for you. Maybe you can dig into the source code of this module and try some fixes. Then build it for yourself.

  • Screen overrun

    Unsolved
    7
    0 Votes
    7 Posts
    177 Views
    SGaistS

    Are other applications behaving in a similar fashion ?

  • Improve signal/slot latency between threads

    Unsolved
    2
    0 Votes
    2 Posts
    46 Views
    I

    When a queued slot connection is invoked, it (roughly speaking) goes to the back of the target object's thread's event queue. The slot is invoked only after all the events that are in queue before it get handled - one at a time, of course, since it is a single thread's events.

    If the time for the slot event to reach the front of the queue (also known as "event loop lag") is too high, it is because there are many events in the queue and/or handing them is slow. The reasons for that are practically infinite, and it is hard to say without much more information, but it might be a UI element that gets repainted too often (e.g. due to unnecessary or too wide calls to update()), or maybe a different widget that takes long to paint (re-doing text shaping is a not uncommon culprit), or maybe a O(n^2) algorithm hiding in a slot, or maybe large data being copied inadvertently (perhaps due to unnecessarily causing Qt's implicitly shared collections to detach) , or maybe god forbid blocking I/O or sleeps somewhere.

    The best tool to diagnose such things is an instrumenting profiler (e.g. callgrind), GammaRay can also provide some specific insight about event handling, and you can always improvise something with a application event filter.

    Good luck!

  • Selection in Qt

    Unsolved
    2
    0 Votes
    2 Posts
    44 Views
    JonBJ

    @Carlosyoot
    selectionBehavior : SelectionBehavior
    enum QAbstractItemView::SelectionBehavior

    selectionMode : SelectionMode
    enum QAbstractItemView::SelectionMode

  • My table does't not dynamic update.

    Unsolved
    17
    0 Votes
    17 Posts
    204 Views
    JonBJ

    @architect23

    In first string I always get zero, I don't understand why?

    Depends what data you have in model->data(left), which nobody but you knows, and for that matter which model model refers to. How should anyone answer?

  • No pen cursor n Qt library

    Unsolved
    11
    0 Votes
    11 Posts
    163 Views
    Pl45m4P

    @oneeyeman1 said in No pen cursor n Qt library:

    So any chance I find this icon/pixmap on Linux somewhere?

    If you don't check you will never know :)
    Go where the icons are stored for your Linux distro...
    As there was said before... if there isn't such standard icon, you have to create your own cursor set and ship it with your app... like most painting tools, games and other programs do

  • 0 Votes
    2 Posts
    43 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