Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • repaint() doesn't, well, repaint when the app doesn't have focus

    Solved
    2
    0 Votes
    2 Posts
    95 Views
    S
    Never mind - seems to be related to the widget being a subclass of QOpenGLWidget. If I change it to a subclass of QWidget, I get my updates just fine. I don't actually need QOpenGLWidget (I was just thinking it might be useful in future) so I'm good.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • 0 Votes
    2 Posts
    110 Views
    Z
    @PuskasAlex said in Cannot show modal dialog or block in QFileSystemModel::dropMimeData() or QTreeView::dropEvent() in Qt 6 during drag and drop: QTreeView::dropEvent(event); Hi, Delete QTreeView::dropEvent(event) and everything will work fine: if (QMessageBox::question(this, "title", "body") == QMessageBox::Yes) event->accept();; else event->ignore();
  • Creating a Double Scrollbar

    Solved
    8
    0 Votes
    8 Posts
    356 Views
    hskoglundH
    If you indeed can have both arrows on the same of the scrollbar, then another approach could be: create a 2nd identical scrollbar which you stack underneath the 1st one (by setting the z-order) and place it so that only the 2 arrows are visible. Then connect the left-right signals from that scrollbar to the slots for 1 st :-)
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • 0 Votes
    6 Posts
    287 Views
    D
    @Axel-Spoerl I took this method from the example of the Qt text editor, it works if any text is selected with this cursor, and continues typing with this cursor with the specified font further. But here's the problem, if I want the behavior as in standard text editors, to first set the font modifiers and then start typing, the font in the cursor is reset to the standard one from QTextDocument. The option to store the cursor in the heap is unlikely to work, since it is impossible to set the cursor in the QTextDocument. At the moment, I have solved the problem using "Pending font", if the cursor does not have any text under it, I write all font changes to the QFont variable, and display font data from it on the UI, and as soon as the user enters something, I immediately apply font settings to the entered character, so far it works quite well. But if it is possible to change the font settings for future input without workarounds, I would be glad to know.
  • Qt Mqtt module not found

    Unsolved
    4
    0 Votes
    4 Posts
    194 Views
    SGaistS
    @ankou29666 you don't need to build the whole of Qt if you need to add a single module to an existing Qt installation.
  • Problem with Build in QML

    Solved
    8
    0 Votes
    8 Posts
    283 Views
    A
    made a try with 6.8.3 on mac, the default template makes project untitled and everywhere else is appuntitled. builds fine, fine. (just complaining that virtual keyboard is not installed, I don't really understand why but doesn't matter). So yeah looks like the name given in project doesn't have to match the name given in qt_add_executable.
  • How to visualize LF, CR and other control pictures in QTextEdit?

    Solved
    21
    0 Votes
    21 Posts
    2k Views
    SGaistS
    Thanks for the feedback ! Looks like a nice tool you are building :-)
  • 0 Votes
    2 Posts
    97 Views
    Axel SpoerlA
    Hi and welcome! Just by reading your problem description: The bug is in your code. In the last case, the user clicks on the All-checkbox. You intercept the click and set the current text to "None" I guess. When that's done, the checkbox processes the click as well and interprets as a selection of the item "All". That sets the current text back to "All". If you add connect(ui->comboBox, &QComboBox::currentTextChanged, this, [](const QString &str){ qDebug() << "Text changed to:" << str; }); somewhere e.g. in the c'tor of MainWindow, I bet you will see, that the current text is set to "None" before it bounces back to "All". Narrowed it down in the example. Nope. Way too complicated. See here.
  • QSoundEffect device selection

    Solved
    3
    0 Votes
    3 Posts
    234 Views
    K
    Sorry, I forgot to update: This was a version I installed using the online installer. I switched to Qt 6.9.1 and it seems resolved now.
  • 0 Votes
    12 Posts
    478 Views
    M
    @jsulm After testing, the QService is unable to open other process programs
  • Qt Creator for University classrooms

    Unsolved
    12
    0 Votes
    12 Posts
    476 Views
    S
    @cristian-adam said in Qt Creator for University classrooms: You can install Qt Creator without the need of a Qt account via Chocolatey as: I have never actually thought of that. I personally have chosen to use Scoop as a package manager (https://scoop.sh). They provide Qt Creator, but not Qt directly. However, they have aqtinstall (that you have already mentioned) as an option. I have never heard of aqtinstall before. But, it seems a good way to actually install Qt without an account. Lastly, I've checked Microsoft's own package manger WinGet: Haven't found Qt there, not even Qt Creator (but somehow Qt Designer?). And they also have aqtinstall.
  • what caused the top line font color seemed so ugly??

    Unsolved
    4
    0 Votes
    4 Posts
    172 Views
    Axel SpoerlA
    I am sorry to say, but you haven’t responded to @SGaist: please provide a minimal compilable reproducer. I am also sorry to say that I do not understand anything in your reply. If you use translating software, that may be the reason. The code you posted is neither formatted correctly, nor enough to compile. Also Qt 5.14 has been EOL for a long time.
  • Qt3D 5.12.0 crash at show/exit when using QText2DEntity msvc2017

    Solved
    6
    0 Votes
    6 Posts
    846 Views
    SGaistS
    @DavidFaure that was a sneaky one !
  • qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""

    Unsolved
    11
    0 Votes
    11 Posts
    656 Views
    K
    Thanks - I think something changed, either between Ubuntu 24 and 25, or Qt 6.8.0 and 6.9.1, as another machine with older versions does not show the issue. Still I guess it's cosmetic as you say, although I tend to be a bit pedantic about getting rid of unnecessary warnings/messages.
  • noexcept build errors after updating to 6.9.0

    Unsolved
    7
    0 Votes
    7 Posts
    651 Views
    jsulmJ
    @GregB Install gcc 10, add that compiler in QtCreator and then create a new Kit where you select that compiler
  • Why does QProcess fail to execute the.bat command to open .exe in QService?

    Solved
    4
    0 Votes
    4 Posts
    192 Views
    jsulmJ
    @mirro Please post code as text, not pictures. In your code you're not waiting after calling exec() and you did not add any error handling as @JonB suggested. And did you check Windows logs as it was also suggested? You should use startDetached instead of execute if you're not waiting for the process to finish. command variable should be a QStringList, not QString.
  • Component Search for an app - Infinite selector carousel

    Unsolved
    2
    0 Votes
    2 Posts
    82 Views
    SGaistS
    Hi and welcome to devnet, This Wiki article might be worth a look. Hope it helps