Skip to content

Qt 6

This is where all Qt 6 related questions belong

820 Topics 4.0k Posts
  • Read before posting in this category!

    Pinned Locked
    3
    6 Votes
    3 Posts
    3k Views
    SGaistS

    And now (incomplete at the time of this post): https://wiki.qt.io/New_Features_in_Qt_6.2

  • ROS2 not added in QT6

    Solved
    12
    0 Votes
    12 Posts
    104 Views
    serkan_trS

    Thank you for the information.

  • Qt Graphs. Building 2d plot using c++ only.

    Unsolved
    1
    0 Votes
    1 Posts
    18 Views
    No one has replied
  • GPL License and Qt Application Manager

    Unsolved
    3
    0 Votes
    3 Posts
    88 Views
    K

    Thanks Pl45m4 !

    I think it will be more reliable if I directly ask to Qt.

  • 0 Votes
    11 Posts
    12k Views
    B

    "sudo apt-get install libgl1-mesa-dev" also worked for me with the error "failed to find required Qt component 'Gui' "
    (Ubuntu 24.04 LTS)

  • Configuring and building Qt for QNX

    Unsolved
    2
    0 Votes
    2 Posts
    193 Views
    J

    We need to set the Qt6HostInfo_DIR as a cmake parameter like -DQt6HostInfo_DIR=/home/...

  • Qt6, TextField not work in Android

    Unsolved
    4
    0 Votes
    4 Posts
    188 Views
    O

    Is Qt a balloon? Working with Qt on Android has been a struggle for a year. I downloaded Qt 6.8, and this issue still hasn't been resolved. Can you believe it? It'll be 2025. Qt 6.8 has been released, and we still can't use input on Android? I used to enjoy developing with Qt, but I'm starting to wonder if I learned it for nothing.

    I'm using Qt 6.8 and I've created an Android application for testing, which includes a TextField. When I click on the TextField, the keyboard comes over the input, and I can't see what is being typed.

  • Error during build from source (AutoMOC)

    Solved
    7
    0 Votes
    7 Posts
    144 Views
    A

    if you want to benefit from an LTS, even with free version of Qt, you have to use the latest minor release available, that is 6.5.6, which brings some bugfixes and security patches.
    If you use 6.5.0, you won't benefit those fixes that have been introduced from 6.5.1 to 6.5.6.
    And it's the same for any version, not only LTS.

    @Christian-Ehrlicher said in Error during build from source (AutoMOC):

    There is no advantage for a non-paying customer to stick at a LTS version at all.

    I personnaly prefer using the latest LTS over latest version when I don't need the new features as new features also come along with potential new bugs and security issues.

    Use the pre-compiled binaries from the Qt online installer - much easier to use and no problems during compilation.

    I agree, self-building is not needed.

  • 0 Votes
    5 Posts
    145 Views
    JonBJ

    @JuFu
    I do not believe that a "crash" error when running your program can be anything like or have any relation to a "crash" from a compiler. They are two totally different issues.
    I do not believe you cannot obtain a "stack trace" if your program crashes at runtime. Try running it from inside a debugger.

  • QTouchEvents::TouchPoint class migration from Qt5 to Qt6

    Unsolved
    2
    0 Votes
    2 Posts
    95 Views
    VRoninV

    I found the source of the change but there is not much more colour on the reasoning behind it. The setters were explicitly moved in the private API so constructors look like your only option (unless you want to use the private headers)

  • moc-generated code error at Qt6 when not at Qt5

    Solved
    18
    0 Votes
    18 Posts
    388 Views
    J.HilkJ

    @JonB non of our customers use Linux, only reason why we support macOS is because its my development environment and its only a few steps more to deploy for it as well ;)

  • Could not find a configuration file

    Unsolved
    8
    0 Votes
    8 Posts
    288 Views
    jsulmJ

    @Kais-Ahmad Are you by any chance mixing MSVC and MinGW? MinGW Qt build requires GLibC.

  • Painting a QVideoFrame on a QVideoWidget with QT6

    Solved
    5
    0 Votes
    5 Posts
    944 Views
    F

    For those who are digging the depths of the internet to do this in Python, I figured out a way. It looks like the Python docs are wrong and/or ambiguous: "The video frame can then be used to read out the data of those frames and handle them further. When using QPainter, the QVideoFrame can be drawing using the paint() method in QVideoSink ."

    I'm not a professional programmer so this may be ugly/non-conforming for some people but this works:

    You can set the QMediaCaptureSession's video sink to your custom sink, and also make a QVideoWidget to display the frames. Then, take that custom sink, and connect some Slot method to the videoFrameChanged Signal, and inside that method do what you need to the frame, and then you can take that frame and use QVideoWidget.videoSink().setVideoFrame(the frame you just modified) and it works like a charm.

    Please respond if this is unclear.

    PS: mods/admins if this is in the wrong place please let me know.

  • 0 Votes
    3 Posts
    108 Views
    Pl45m4P

    @Damned-Ananas

    The code you show does not work as the three QLabels are not part of any layout.
    So setting

    hLayout->setStretch(0, 1); hLayout->setStretch(1, 1); hLayout->setStretch(2, 4);

    does not affect the labels, unless you are doing something else which you did not show.

    And, as @JonB said above, until the layouts are applied and the widget is shown, you can't trust the widget's geometry you receive from geometry(), width() or height() as these values are generic/default values based on your settings and not how the widget actually looks when being rendered in some window or parent widget.

    So please show your complete/actual code (and/or try what @JonB suggested)

  • 0 Votes
    2 Posts
    206 Views
    M

    Hello,
    Unfortunately, there's no direct way to determine if your fragment shader is running within a Qt application or environment using built-in preprocessor directives or variables.
    Understanding the Limitations
    Shader Isolation: Shaders operate in a relatively isolated environment, with limited access to the surrounding application context.
    Platform-Specific Information: Information about the application environment is typically handled at a higher level, outside the shader's scope.

  • Windows11 native appearance question

    Unsolved
    2
    0 Votes
    2 Posts
    237 Views
    I

    I also have the same issue, and cannot find anyone else complaining. I don't have a solution for you though.

    I recently transitioned from 6.6.1 to 6.7.2. And the "windows11" style in light mode looks hideous. There is less contrast throughout the application, making it difficult to navigate. Some bits are nice, but most are bad. The silver lining is that dark mode is better than the previous Fusion style, especially checkboxes. In light mode, I'm setting the style to "windowsvista" to achieve 6.6.1 look for now.

  • Qt to Sql connection

    Unsolved
    3
    0 Votes
    3 Posts
    105 Views
    JonBJ

    @Chakravarthi-N
    Same as it has always been. Have you started by reading SQL Programming and Connecting to Databases?

  • Bluetooth not working In Qt 6

    Unsolved
    6
    0 Votes
    6 Posts
    253 Views
    M

    @JonB @Q-Master @Qt-Enthusiast @Qt-embedded-developer I have this configuration use for msvc compiler and i have run different project that perfectly run with this configuration

    image.png

  • Question for Qt6.2 - Qt.labs.platform Dialog

    Unsolved
    6
    0 Votes
    6 Posts
    805 Views
    J

    because the qt.labs.platform has the Dialog as well, need to specifically use Dialog control in QtQuick.Controls

  • Is there any change in the licensing from qt5 to qt6?

    Unsolved
    2
    0 Votes
    2 Posts
    150 Views
    jsulmJ

    @Vishal-Kumar said in Is there any change in the licensing from qt5 to qt6?:

    Is there any change happened to qt6 opensource licensing which might cause an issue later ?

    As far as I know there are no changes since Qt 5.6 (where LGPL was changes to v3).