Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.8k Posts
  • Calling canvas update event in js from QWebChannel

    Unsolved
    2
    0 Votes
    2 Posts
    232 Views
    M
    @MyNameIsQt var i = 0; window.addEventListener('resize', function(){ //++i; drawCanvas(++i); }); [image: 209e53c6-b290-46a4-aac5-a26bec773de0.JPG] As shown in the picture below, the function called within the js file works exactly. However, when the drawCanvas function is called from cpp, the 'canvas' screen is not updated even if the correct data value is passed.
  • Build Qt on Ubuntu 22: md4c::md4c-html

    Solved
    2
    0 Votes
    2 Posts
    863 Views
    D
    To solve this problem do sudo apt-get install libmd4c* Full code here.
  • make buttons process events

    Solved
    5
    0 Votes
    5 Posts
    489 Views
    Kent-DorfmanK
    @jeremy_k Thanks for super()...It's been a while since I've had to program and had not considered that the super needed to be called as a function. That solved my hanging problem. keyboard events are not an issue now since I can properly trap the right-click now with mouseReleaseEvent()
  • QML rendering upside down in VS debugger

    Unsolved
    1
    0 Votes
    1 Posts
    125 Views
    No one has replied
  • qmake -query has wrong output

    Unsolved
    4
    0 Votes
    4 Posts
    500 Views
    C
    @g1ennr What is actually in your .../Qt/5.15.2/mingw_64/bin/qt.conf?
  • QDate also encodes time of day?

    Unsolved
    6
    0 Votes
    6 Posts
    349 Views
    JonBJ
    @clarify Sorry, don't see how that has anything to do with a QDate. A QDate is "defined" as a date with no time of day. If you want to deal with a datetime, use a QDateTime.
  • What thirdparty packages are used in Qt5 PDF module for display of PDF files?

    Unsolved
    8
    0 Votes
    8 Posts
    892 Views
    SGaistS
    @JoeCFD You can see it in the code source directly as well as the CMakeLists.txt files of the module.
  • This topic is deleted!

    Unsolved
    12
    0 Votes
    12 Posts
    1k Views
  • 0 Votes
    2 Posts
    585 Views
    Christian EhrlicherC
    The style always wins as written here: https://doc.qt.io/qt-6/stylesheet.html#overview "Style sheets are applied on top of the current widget style,"
  • QTabBar "Paint Event" & Stylesheet Conflicting

    Locked Unsolved
    2
    0 Votes
    2 Posts
    264 Views
    Christian EhrlicherC
    Dupe of https://forum.qt.io/topic/152497/qtabbar-paint-event-stylesheet-conflicting
  • how to add anther primary sub-menu - in C++ code ?

    Moved Unsolved aniother
    1
    0 Votes
    1 Posts
    183 Views
    No one has replied
  • Menubar in MacOS not working.

    Unsolved
    10
    0 Votes
    10 Posts
    4k Views
    W
    Working on same course, had same mac issue. Note: "quit" is not visible - by design - on a Mac. After a lot of searching, here is fix that works on both Linux and Mac: ``` // declare actions from .h act_quit = new QAction("quit"); act_stop = new QAction("Stop"); // connect actions QObject::connect(act_quit,&QAction::triggered,this, [=](){QApplication::quit(); }); QObject::connect(act_stop,&QAction::triggered,this, [=](){QApplication::quit(); }); // add menus QMenu *filemenu = menuBar()->addMenu("File"); filemenu->addAction(act_quit); filemenu->addAction(act_stop); QMenu *mnu_other = menuBar()->addMenu("Other"); mnu_other->addAction(act_quit); mnu_other->addAction(act_stop); QMenu *mnu_three = menuBar()->addMenu("hello"); mnu_three->addAction(act_quit); mnu_three->addAction(act_stop);
  • QT 5.15.5 Static Commercial Build

    Unsolved
    6
    0 Votes
    6 Posts
    395 Views
    A
    @ChrisW67 I could also switch to MINGW instead. I 'd rather not use an older Microsoft dev kit.
  • 0 Votes
    5 Posts
    320 Views
    D
    @Christian-Ehrlicher I was gonna use them in a language switching mechanism, where I provided several QTranslators to that would then have been installed dynamically if they matched the desired language. Never mind, I will prime the translators with a prebuilt set of qm files, that give them the initial language and then adding my testing strings separately. Those test qm files do not need to contain the actual strings. The language information is sufficient. My language switcher can then determine the language from that and still use the custom translate method.
  • No CMake configuration found

    Unsolved
    3
    0 Votes
    3 Posts
    449 Views
    hskoglundH
    Hi, just a guess but maybe you need to enable the aarch64 architecture if you're crosscompiling, something like this: sudo dpkg --add-architecture arm64 sudo apt install libc6:arm64
  • Threading scene

    Unsolved
    8
    0 Votes
    8 Posts
    823 Views
    JonBJ
    @micha_eleric I had not noticed, but as @J-Hilk has said 400,000,000 is a lot of items to draw ;-) Not to mention, this is a lot for the user to look at/I'm not sure there are even that many pixels on the screen! But I guess you will see this is just a test. If you have a "lot" of add/move/delete operations to perform, you must either (a) do the operations in batches on a timer from a "queue" (at least conceptually), presumably from the UI thread, so that the UI has time to render them and remains responsive, or (b) if @SimonSchroeder's principle of "double-buffering"/mutexing works from a thread you would have to release the mutex periodically after batches performed so that the UI thread gets some time to process the updates without blocking on a mutex for too long.
  • Can anybody explain the Qt::BlockingQueuedConnection with example ?

    Solved
    18
    0 Votes
    18 Posts
    8k Views
    S
    @mdrost And a DirectConnection is by definition always blocking.
  • Long press button with progress dialog

    Solved
    8
    0 Votes
    8 Posts
    847 Views
    W
    @Christian-Ehrlicher the user will not see well the button because they will have the finger on top of it blocking visibility.
  • QPaintEngine Color Alpha Chanel(opacity) makes everything to draw Image

    Unsolved
    1
    1 Votes
    1 Posts
    140 Views
    No one has replied
  • Custom context menu item

    Solved
    12
    0 Votes
    12 Posts
    3k Views
    G
    Thank you all. I think ill be able to achieve this now. Also thanks for the suggestion I will dig deeper into that stuff.