Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.3k Posts
  • QToolButton: weird padding behavior compared to QPushButton

    Unsolved
    7
    0 Votes
    7 Posts
    3k Views
    S
    Well, I face the same problem. Maybe I should subclass the QToolButton.
  • Dialogue vanishes when any button is pressed.

    Solved
    10
    0 Votes
    10 Posts
    890 Views
    Pl45m4P
    @Perdrix said in Dialogue vanishes when any button is pressed.: why would uic put those lines there??? I suspect that Add and Delete button were the buttons that come with a QDialog QtDesigner template... these are connected to the slots by default... to reject and to accept respectively. I think you used these two, renamed and re-designed them while modifying your UI file, while the connection persists. Similar to the "hidden" connect slots by name mechanic, which also might confuse you if one is not aware of that :)
  • How to use .ui file in a QT Custom Designer Widget project?

    Unsolved
    3
    0 Votes
    3 Posts
    270 Views
    Q
    Post content was flagged as spam by Akismet.com why???
  • View model for nested structure with list (QAbstractListModel, QAbstractItemModel)

    Unsolved
    3
    0 Votes
    3 Posts
    287 Views
    S
    Yes, in this case, you need a hierarchical model since a Lesson contains multiple Topics. The QAbstractListModel is not sufficient because it only supports a flat list. Instead, you should use QAbstractItemModel to represent the hierarchical data structure.
  • 0 Votes
    2 Posts
    754 Views
    J
    I've worked around the problem, by directly including the windows headers. Sadly i still have no good explanation for why this wasn't required in 6.5.3, and is required in 6.8.2
  • 0 Votes
    2 Posts
    201 Views
    SGaistS
    Hi and welcome to devnet, Which version of 5.15 are you using ? On which platform ? Based on the comment of the patch, it seems related to High DPI as week which has seen quite a lot of improvement so it might not be possible to backport all of the related work.
  • Menu not showing up in menuBar

    20
    0 Votes
    20 Posts
    32k Views
    enjoysmathE
    Well, there's no more window bar nor app icons on Windows 10
  • [QFileSystemModel] Data not updated after folder renaming

    Unsolved
    4
    0 Votes
    4 Posts
    395 Views
    N
    I'm trying to understand better what's happening: so I try to use directly the QFileSystemWatcher. Supposing the following scenario: Folder A --- Folder B now I add the path Folder A -> Folder B to a QFileSystemWatcher's instance; everything I change within Folder B is correctly notified thanks directoryChange() signal. Now I rename Folder B to Folder BB and I create another Folder B: Folder A --- Folder BB (previous Folder B) --- Folder B Supposing having this capture: connect(&fsWatcher, &QFileSystemWatcher::directoryChanged, this, [&](const lString& path) { std::cout << path; }); if I change something on Folder BB, the value printed is Folder B. This is quite reasonable, because at the beginning I added Folder B to QFileSystemWatcher's instance; however, cause signal notifiy a change just using the string Folder B, it seems that something changes on new Folder B; and this may broke the relation between Qt and real file system status.
  • (.json) file not found

    Solved
    4
    0 Votes
    4 Posts
    396 Views
    M
    ok guys thanks, I will just put the file in a physical location on my device
  • Icons don't appear in projects (Windows)

    Solved
    48
    0 Votes
    48 Posts
    21k Views
    enjoysmathE
    This is fucking ridiculous. How can I add an icon to my Qt Tools for VS project?
  • QFutureWatcher docs mismatch

    Solved
    3
    0 Votes
    3 Posts
    244 Views
    V
    @JonB Thanks a lot, closing.
  • Crash in Qt and unrelated to my code.

    Unsolved
    2
    0 Votes
    2 Posts
    257 Views
    Axel SpoerlA
    Sorry to say, but the issue is in your code, not in Qt. It occurs, when a model is called with a QModelIndex from another model. That can happen either, when there the wrong model is called, or when the index is mal-constructed. Please boil the problem down to a minmal, cmplilable reproducer. Just showing the App architecture is helpful but not sufficient. Please post the minimal reproducer here, using code tags.
  • 0 Votes
    2 Posts
    175 Views
    SGaistS
    Hi, Without knowing which Qt version, which OS, how you set things up, it's pretty much impossible to know what is going on.
  • how to build qmlplugindump with Qt 6.8.1

    Unsolved
    1
    0 Votes
    1 Posts
    143 Views
    No one has replied
  • 0 Votes
    5 Posts
    568 Views
    Tom assoT
    @jeremy_k - thanks for that clarification. I ended up defining runTest() as follows: INVOKABLE QList<QVector2D> TopoDataItem::runTest(void ) { QList<QVector2D> profile; // Add content to profile [...] return profile; } The QML invokes the method as follows: Button { text: qsTr('run test') onPressed: { var profile = topoDataItem.runTest(); // Do stuff with profile data [...] } } This seems to work with my application, without need to register additional stuff with the metatype system.
  • Invoking Qt Assistant

    Unsolved
    3
    0 Votes
    3 Posts
    211 Views
    PerdrixP
    Thanks - gives me something for the little grey cells to ponder.
  • Qcompleter Rules

    Unsolved
    4
    0 Votes
    4 Posts
    297 Views
    Pl45m4P
    @Carlosyoot said in Qcompleter Rules: I create two columns that turn into one item, and I just return part of that item? No, just a model where you have two columns in each row (data entry). One for your description like Samsung S21 and one for your "code" or whatever data behind that, like 00001. Then you create a simple delegate for that model to display the column of data you need from the model and set that delegate to your view.
  • Corrupted menu?

    Unsolved
    2
    0 Votes
    2 Posts
    176 Views
    Pl45m4P
    @Carlosyoot You probably set a stylesheet somewhere that turned the background of some base class black. What is your OS and Qt version?
  • QTimer slot not getting called correctly....

    Moved Unsolved
    5
    0 Votes
    5 Posts
    483 Views
    J
    @Christian-Ehrlicher said in QTimer slot not getting called correctly....: Why? I would guess this will take quite some time... That code was from one of the previous employees, I tried to optimize this with QgsRubberband and doing setToGeometry() for the rubberband
  • I can't build any version of qt because of assimp

    Unsolved
    12
    0 Votes
    12 Posts
    1k Views
    A
    @JonB For the record, I download the last Qt6 environment and I compiled the Qt6 source code without any problem. Thanks for the support.