Skip to content

Qt 6

This is where all Qt 6 related questions belong

827 Topics 4.0k Posts

QtWS: Super Early Bird Tickets Available!

  • 0 Votes
    4 Posts
    365 Views
    SpazzS

    aaaaand I found the solution :

    yippipi.jpg
    icosphere.jpg

    As you can see, the floor origin is now perfectly positionned (and fits with any mesh).

    Solution in short :

    handle the statusChanged signal once status == Qt3DRender::QMesh::Ready, the mesh is loaded BUT its bounding box is not (necessarily?) computed yet. I made this assumption and this was the mistake. handle the minExtentChanged signal by connecting it to a function ONLY ONCE status == Qt3DRender::QMesh::Ready update the plane position in this function

    Here is the final code :

    void MyScene::handleStatusChanged(const Qt3DRender::QMesh::Status &status) { if(status == Qt3DRender::QMesh::Ready) { connect(mesh.geometry(), &Qt3DCore::QGeometry::minExtentChanged, this, &MyScene::handleMinExtentChanged); } } void MyScene::handleMinExtentChanged(const QVector3D & minExtent) { Qt3DCore::QTransform * planeTransform = new Qt3DCore::QTransform(&floorEntity); planeTransform->setTranslation(QVector3D(0.0f,mesh.geometry()->minExtent().y(),0.0f)); floorEntity.addComponent(planeTransform); }

    More details

    I was mistaken by the Qt3DRender::QMesh::Ready status : the fact that the QMesh is flagged as "Ready" does not mean that its bounding box is computed.

    Indeed, minExtent and maxExtent values are set by the function setExtent in qgeometry.cpp. By setting one breakpoint in setExtent and one breakpoint in the if statement of handleStatusChanged, you will observe that the if statement breakpoint is triggered the first. That is, even thought the QMesh is "Ready", it's extents are not yet set.

    Furthermore, you have to wait for the QMesh to be "Ready" before connecting to the minExtentChanged signal because before that, the QGeometry associated to mesh is not set. You cannot connect to mesh.geometry() immediatly after a call to setSource because the QGeometry it points to is nullptr, and change only once the QMesh is "Ready". That's the reason why I'm connecting only in the if statement of handleStatusChanged

    Hopefully this will help some people.

    PS : I still do not understand how to use updateImplicitBounds(), but I'm done with my issue here.

  • QML that support Qt5.6 and Qt6.2

    Solved
    2
    0 Votes
    2 Posts
    244 Views
    R

    After looking at some code, I can't do what I'm trying to do without a recompile of the virtual keyboard source.
    In the Qt5.6 source, there is a string that describes the qrc path that VK QML files are installed to. The styles.qrc and qmldir would need to change as well.

  • Issue linking .lib or .dll for usage in .cpp

    Solved
    13
    0 Votes
    13 Posts
    757 Views
    O

    @hskoglund

    I just tested out your answer, and it worked like a charm. Thank you so much for your assistance! It is very appreciated :)

  • how to get qtablewidgetitem from qstandarditem?

    Unsolved
    4
    0 Votes
    4 Posts
    280 Views
    JonBJ

    @yangyanhui4
    enum Qt::ItemFlag has

    Qt::ItemIsUserCheckable 16 It can be checked or unchecked by the user.

    You want that to be unset on the items where the checkbox is to be disabled. See e.g. https://forum.qt.io/topic/120725/qtableview-show-checkbox-but-keep-it-disabled/8.

  • Qt 6.2 Android Bluetooth Socket connect Error

    Solved
    7
    2 Votes
    7 Posts
    1k Views
    M

    With the recent release of Qt 6.2.3 I verified that this has been fixed and android bluetooth is indeed working. Thanks everyone!

  • This topic is deleted!

    Unsolved
    2
    0 Votes
    2 Posts
    35 Views
  • 0 Votes
    1 Posts
    204 Views
    No one has replied
  • 0 Votes
    5 Posts
    589 Views
    M

    Hi All,

    It's got resolved. Issue was from weston-wayland side and for same weston has given patch.

    After applying that patch issue got resolved.

    https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/210

    Thanks all.

  • 0 Votes
    1 Posts
    128 Views
    No one has replied
  • 0 Votes
    2 Posts
    450 Views
    R

    Figured out that I didn't have 'singleton' assigned to the BCSize.qml file in the qmldir, which is now auto-generated. I had to add:

    set_source_files_properties(BCSize.qml
    PROPERTIES
    QT_QML_SINGLETON_TYPE TRUE
    )

  • QT6 Map Viewer with QML

    Unsolved
    3
    0 Votes
    3 Posts
    1k Views
    T

    What are you think about QGeoView that is link below. It can be used with QT6. May you share about your thinking.

    https://github.com/AmonRaNet/QGeoView

  • This topic is deleted!

    Solved
    1
    0 Votes
    1 Posts
    6 Views
    No one has replied
  • 0 Votes
    4 Posts
    519 Views
    R

    Closing - files are in qrc system. Codegen errors are likely just due to some setting that is on a more sensitive setting.

  • QLocation and QTextToSpeech in Qt 6.x

    Moved Unsolved
    3
    0 Votes
    3 Posts
    208 Views
    SGaistS

    Hi,

    There's currently work in progress to bring QtLocation to Qt 6.

    If memory serves well you should be able to build both modules yourself.

  • Building Qt-6.2.3 on Windows has troubles with tiff

    Solved
    8
    0 Votes
    8 Posts
    862 Views
    S

    I walked around the issue by specifying "-qt-zlib" instead of "-system-zlib".
    Customizing building Qt is really hard.
    Thanks @jsulm .

  • How to unset QMenu from QPushButton?

    Solved
    5
    0 Votes
    5 Posts
    347 Views
    Christian EhrlicherC

    @DeeDee14 Then you're doing something wrong. It works as expected, also the code explicitly allows this.

    QPushButton pb; QMenu *myMenu = new QMenu; pb.setMenu(myMenu); QTimer::singleShot(2000, &pb, [&]() { pb.setMenu(nullptr); }); pb.show();
  • qtwebview and webworkers

    Unsolved
    1
    0 Votes
    1 Posts
    116 Views
    No one has replied
  • 0 Votes
    2 Posts
    424 Views
    Christian EhrlicherC

    If you want to validate xml you should use XSLT

  • How to get screen size in PyQt6?

    Unsolved
    3
    0 Votes
    3 Posts
    3k Views
    Christian EhrlicherC

    QScreen should also be available for PyQt.

  • Analog of QWinTaskbarProgress in Qt 6

    Unsolved
    2
    0 Votes
    2 Posts
    599 Views
    Christian EhrlicherC

    See https://forum.qt.io/topic/131934 - no more news on this.