Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.3k Posts
  • 0 Votes
    13 Posts
    377 Views
    Axel SpoerlA
    Looks like the bug doesn't reproduce anymore.
  • Linker error for vcpkg built package

    Unsolved
    1
    0 Votes
    1 Posts
    39 Views
    No one has replied
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • No pen cursor n Qt library

    Unsolved
    13
    0 Votes
    13 Posts
    687 Views
    AtesCompA
    For Linux, the standard set of cursors for cursor themes are documented in /usr/include/X11/cursorfont.h. These are the 'well known' cursors under Linux OSes and have been for decades (notice the "Copyright 1987, 1998 The Open Group"). For documentation, see: For KDE (in particular Creating the symlinks) For General X11 Note the XC_pencil entry. Yes, there are a lot of silly ones (XC_bogosity anyone). I'm almost sure the Qt devs know this. They had to have done some kind of background research on this to get the Qt::CursorShape enums to map to the system's cursor theme. There...homework done! Extra Credit: All of the entries are related to so-called cursor state. The cursor images map to one or more states . A cursor theme does not require all cursor state be mapped by cursor images, so some cursors may be missing from a theme. However, a "good" theme should have an Inherits= key-value in the [Icon Theme] section of its the index.theme file so that it has a chance to complete the entire theme with some kind of cursor image for each state. What does Qt do when a system cursor is not present in the current theme? In any case, the best practice is to test for these cursors by the given Qt::CursorShape enums and, if not found, provide your own by using QCursor(const QPixmap...) or QCursor(const QBitmap...). Admittedly, the Qt::CursorShape enums should likely expand to cover all standard cursor icons provided by the OS. The QCursor(Qt::CursorShape shape) and void QCursor::setShape(Qt::CursorShape shape) method should likely throw some exception when a cursor is not actually found in the system's current theme. Or, to make things a bit nicer, change setShape() to return a boolean value.
  • Qt Qml edit in Jetson Nx orin Ubuntu 20.04

    Unsolved
    2
    0 Votes
    2 Posts
    44 Views
    SGaistS
    Hi and welcome to devnet, You can use your main machine to edit your project and copy it over to your Jeston. Qt Design Studio is available Open Source.
  • QT HTML to pdf width error

    Unsolved
    2
    0 Votes
    2 Posts
    72 Views
    Pl45m4P
    @JISU Hi, try QPdfWriter instead and I don't think the style width = 100% is supported, so you get your table, but not stretched over the whole page.
  • 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
    82 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
    102 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
    318 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
    257 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
    173 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
    245 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
    95 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
    225 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
    436 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
    443 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.