Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.3k Posts
  • Column 1 out of range although datas aren't missing and data are showing properly

    Unsolved
    12
    0 Votes
    12 Posts
    1k Views
    Thank YouT
    @JonB Although it is kinda late but l am currently using QT 5.15.2. But also getting same result. I used the drivers from https://github.com/thecodemonkey86/qt_mysql_driver/releases I don't know any other drivers for this
  • "forcing" the recomputation of a property

    Unsolved
    2
    0 Votes
    2 Posts
    225 Views
    JKSHJ
    @EddieC Have a look at the new property system in Qt 6: https://www.qt.io/blog/all-about-property-bindings-in-qt-6.2
  • This application failed to start because no Qt platform ...

    Solved
    16
    0 Votes
    16 Posts
    9k Views
    JKSHJ
    @Chris-King said in This application failed to start because no Qt platform ...: I am running into this message attempting to run Houdini. Please provide the full, exact message. There are subtly different versions of the message; some include additional details which can help pinpoint the exact issue. Are all these vendors not properly installing their apps? Most vendors probably installed their apps correctly. However, it only takes 1 badly-behaved app to cause DLL Hell and ruin things for everyone else on that PC. You'll need to track down that badly-behaved app and do something about it. Are users expected to modify their installations of these apps using windeployqt? No, users are not expected to do anything. Software developers are expected to provide well-behaved installers.
  • QWizard vs a QDialog with stack control?

    Solved
    4
    0 Votes
    4 Posts
    447 Views
    D
    Nevermind I had the second group in the "New" dialog for Qt Designer collapsed so I didn't see the wizard option. Now I do. Should be easy from here.
  • Why does Valgrind show me over a 1000 errors related to Qt header files?

    Unsolved
    7
    0 Votes
    7 Posts
    729 Views
    C
    @JonB Thanks, I will try that. But at the moment I can't even run the app, because I tried upgrading to 5.15.2.
  • Getting maximized dialogs normal size?

    Solved
    2
    0 Votes
    2 Posts
    225 Views
    D
    Of course I figured this out just a few minutes after posting, sorry for wasting your time. Anyone who's interested there is a function in the dialog/widget class called normalGeometry() which holds the unmaximized size of the window.
  • Memoy leak using QtCharts

    Unsolved
    30
    0 Votes
    30 Posts
    7k Views
    mrjjM
    @thiagohd Hi I dont think I bug report was ever created or it was further looked at.
  • UI is not updating in build (MSVS 2019, QT6)

    Unsolved
    6
    0 Votes
    6 Posts
    495 Views
    JonBJ
    @Meeuxi This was not the question. I have not used Visual Studio, but I assume when you change a .ui file the project has to rebuild? I am asking whether that happens for the .ui file you say is not reflecting changes in the latest executable?
  • Issues with loadFromData function in QImage

    Solved qimage qpixmap taglib image issue
    14
    0 Votes
    14 Posts
    3k Views
    Christian EhrlicherC
    @Nick-Redwill This is what windeployqt is for...
  • btchat does not find any Bluetooth devices

    Unsolved
    1
    0 Votes
    1 Posts
    150 Views
    No one has replied
  • can't run QT6 in visual studio 2022

    Unsolved
    16
    0 Votes
    16 Posts
    10k Views
    G
    @HerrWinfried The problem is that VS2022 doesn't return by default the right value for __cplusplus No idea if that's a bug or a feature in VS2022. However, here the solution how to overcome this issue: https://docs.microsoft.com/en-us/cpp/build/reference/zc-cplusplus?view=msvc-170 cheers Greg
  • Parsing JSON file

    Solved
    23
    0 Votes
    23 Posts
    3k Views
    J
    @KroMignon said in Parsing JSON file: @jenya7 said in Parsing JSON file: It works. Thank you. But you did not reply to my question... What exactly did not work with your code? AFAIK, there is no difference between temperature.value("Maximum") and temperature["Maximum"]. Yes. It should be the same. Probably I didn't cast it to the right data type.
  • Try to deploy a Subdirs project in Linux.

    Unsolved
    8
    0 Votes
    8 Posts
    1k Views
    JonBJ
    @django-Reinhard Fortunately I do not distribute any Qt apps, so I have never used them :) But if I did I would be looking at using linuxdeployqt and windeployqt.
  • Action Focus behaviour

    Unsolved focus action focusscope shortcut
    1
    0 Votes
    1 Posts
    381 Views
    No one has replied
  • How can I place a qlabel over qwidget placed in a window container?

    Solved qlabel qwidget window
    6
    0 Votes
    6 Posts
    2k Views
    JKSHJ
    @new-qt_user-2022 All the best! Feel free to post new questions if you'd like further help.
  • QProcess: Start, interact and keep running when Application exits

    Unsolved
    12
    0 Votes
    12 Posts
    943 Views
    JonBJ
    @themts Assuming you do write a separate Qt "VPN spawner" application, you then have a choice if it helps: you can start that startDetached(), or if you prefer for communication with it you can start it with normal start() and have it do the startDetached() when it starts the VPN process.
  • how to change QComboBox items?

    Unsolved
    2
    0 Votes
    2 Posts
    361 Views
    Christian EhrlicherC
    Use QComboBox::setItemData() with Qt::EditRole (or Qt::DisplayRole - it's the same for the underlying QStandardItemModel)
  • QGraphicsItem receive mouse events based on bounding rect, not item shape

    Solved
    9
    0 Votes
    9 Posts
    2k Views
    E
    My bad, I was actually using QGraphicsView as a base. I've instead made a custom QGraphicsScene and I've overridden the mouse press event, like so: void CustomGraphicsScene::mousePressEvent(QGraphicsSceneMouseEvent *evt) { switch (evt->button()) { case Qt::LeftButton: { QList<QGraphicsItem *> items = this->items(evt->pos(), Qt::IntersectsItemBoundingRect); QListIterator<QGraphicsItem *> it(items); while (it.hasNext()) { QGraphicsItem *item = it.next(); if (item->boundingRegion(item->sceneTransform()) .contains(evt->pos().toPoint())) { item->setSelected(!item->isSelected()); break; // This can happen twice cuz of float rounding nonsense } } break; } case Qt::RightButton: { clearSelection(); break; } default: { break; } } QGraphicsScene::mousePressEvent(evt); } The reason I don't just use the graphics view mouse event is because, even though it was working before to an extent, it broke when I scrolled because the mouse event's position doesn't scroll with it. This doesn't work the same as that did, though, when it comes to selection of the whole item. Now I'm back where I started and am considering creating a rectangle around the point & getting the containing items of that & doing the boundingRect() logic myself. The code that somewhat worked before: void CustomGraphicsView::mousePressEvent(QMouseEvent *evt) { switch (evt->button()) { case Qt::LeftButton: { QList<QGraphicsItem *> items = this->scene()->items(evt->pos(), Qt::IntersectsItemBoundingRect); QListIterator<QGraphicsItem *> it(items); while (it.hasNext()) { QGraphicsItem *item = it.next(); if (item->boundingRegion(item->sceneTransform()).contains(evt->pos())) { item->setSelected(!item->isSelected()); break; // This can happen twice cuz of float rounding nonsense } } break; } case Qt::RightButton: { scene()->clearSelection(); break; } default: { break; } } QGraphicsView::mousePressEvent(evt); }
  • sql experts around?

    Solved
    11
    0 Votes
    11 Posts
    658 Views
    HoMaH
    @kshegunov Heureka! You put me onto the right track: I found the following SQL working on SQLITE, solving my problem: SELECT productId , dateOfP , (SELECT sum(value) FROM (SELECT value FROM purchases AS pu WHERE pu.productId = purchases.productId AND pu.dateOfP > DATE(purchases.dateOfP, '-1 years') AND pu.dateOfP <= purchases.dateOfP) ) AS Summe FROM purchases GROUP BY dateOfP So thank you and also to Christian, who pointed into the right direction!
  • Dealing with lots of objects is very slow

    Unsolved
    3
    0 Votes
    3 Posts
    352 Views
    mrjjM
    Hi That many labels are heavy to draw. A listView / Table with a delegate will be much faster. Look at https://forum.qt.io/topic/62363/custom-delegate/3 for starter code.