Skip to content

Qt 6

This is where all Qt 6 related questions belong

890 Topics 4.4k Posts
Qt 6.11 is out! See what's new in the release blog
  • Read before posting in this category!

    Pinned Locked
    3
    6 Votes
    3 Posts
    4k Views
    SGaistS
    And now (incomplete at the time of this post): https://wiki.qt.io/New_Features_in_Qt_6.2
  • How to decode H.264 streams to a Surface using NDK AMediaCodec in QML on the Android

    Unsolved
    3
    0 Votes
    3 Posts
    409 Views
    JoeCFDJ
    @qwqwqw2 use gstreamer raw code for rendering rtsp streaming. NDK AMediaCode may not be needed. Media Player is not the right tool.
  • Why lupdate.exe need UAC?

    Unsolved
    5
    0 Votes
    5 Posts
    311 Views
    R
    @jsulm said in Why lupdate.exe need UAC?: And you're really asked for credentials if you try to execute them? yes , will popup the UAC windows
  • "unsupported mach-o filetype (only MH_OBJECT and MH_DYLIB can be linked)" (Qt6, Mac)

    Unsolved
    4
    0 Votes
    4 Posts
    361 Views
    SGaistS
    The thing is (even if it somehow worked before): you don't link dynamic plugins. They are loaded at run time but are not linked into your binary. I can totally relate to not doing a build system migration at the same time as a gazillion other things more pressing.
  • Whether Qt Can Render Its Interface To A Vector Image Format

    Solved
    8
    0 Votes
    8 Posts
    729 Views
    RokeJulianLockhartR
    @Chris-Kawa, using lookandfeeltool -a org.kde.breeze.desktop, that isn't a problem: #!/usr/bin/env python3 import sys from PySide6.QtCore import Qt, QRect from PySide6.QtGui import QAction from PySide6.QtSvg import QSvgGenerator from PySide6.QtWidgets import ( QApplication, QCheckBox, QComboBox, QFormLayout, QGroupBox, QLabel, QLineEdit, QMainWindow, QPushButton, QSpinBox, QVBoxLayout, QWidget, ) class MainWindow(QMainWindow): def __init__(self): super().__init__() self.setWindowTitle("SVG Export Example") central = QWidget() self.setCentralWidget(central) layout = QVBoxLayout(central) group = QGroupBox("Settings") layout.addWidget(group) form = QFormLayout(group) self.name = QLineEdit("Roke") self.number = QSpinBox() self.number.setValue(42) self.combo = QComboBox() self.combo.addItems(["Alpha", "Beta", "Gamma"]) self.check = QCheckBox("Enable feature") self.check.setChecked(True) form.addRow("Name:", self.name) form.addRow("Number:", self.number) form.addRow("Mode:", self.combo) form.addRow("", self.check) self.label = QLabel( "This interface is rendered directly into SVG." ) self.label.setWordWrap(True) layout.addWidget(self.label) self.export_button = QPushButton("Export SVG") self.export_button.clicked.connect(self.export_svg) layout.addWidget(self.export_button) export_action = QAction("Export SVG", self) export_action.triggered.connect(self.export_svg) self.menuBar().addAction(export_action) def export_svg(self): svg = QSvgGenerator() svg.setFileName("ui.svg") svg.setTitle("Qt Widget Export") svg.setDescription("Exported using QWidget.render()") size = self.size() svg.setSize(size) svg.setViewBox(QRect(0, 0, size.width(), size.height())) self.render(svg) print("Exported to ui.svg") app = QApplication(sys.argv) window = MainWindow() window.resize(500, 300) window.show() sys.exit(app.exec()) <?xml version="1.0" encoding="UTF-8"?> <svg width="176.39mm" height="105.83mm" baseProfile="tiny" version="1.2" viewBox="0 0 500 300" xmlns="http://www.w3.org/2000/svg"> <title>Qt Widget Export</title> <desc>Exported using QWidget.render()</desc> <g fill-rule="evenodd" font-family="Monospace" font-size="10" font-weight="400" stroke-linecap="square" stroke-linejoin="bevel"> <g fill="#eff0f1"> <rect width="500" height="300"/> </g> <g fill="#dee0e2" stroke="#000" stroke-linecap="square" stroke-linejoin="bevel" stroke-opacity="0"> <rect width="500" height="31"/> </g> <g fill="#dee0e2" stroke="#b9bbbd" stroke-linecap="square" stroke-linejoin="bevel"> <polyline points="0 30 499 30" fill="none"/> </g> <g transform="translate(6 36)" fill="#f4f5f5" stroke="#c6c8c9" stroke-linecap="square" stroke-linejoin="bevel"> <path d="m0.5005 5.0005c0-2.4853 2.0147-4.5 4.5-4.5h478c2.485 0 4.5 2.0147 4.5 4.5v168c0 2.485-2.015 4.5-4.5 4.5h-478c-2.4853 0-4.5-2.015-4.5-4.5v-168z" fill-rule="evenodd"/> </g> <g transform="translate(6 36)" fill="none" stroke="#232629" stroke-linecap="square" stroke-linejoin="bevel"> <text x="212.313" y="20.0469" fill="#232629" font-family="Monospace" font-size="10" font-weight="400" stroke="none" xml:space="preserve">Settings</text> </g> <g transform="translate(30 70)" fill="none" stroke="#232629" stroke-linecap="square" stroke-linejoin="bevel"> <text y="20.5469" fill="#232629" font-family="Monospace" font-size="10" font-weight="400" stroke="none" xml:space="preserve">Name:</text> </g> <g transform="translate(75 70)" fill="#fff"> <rect x="6" y="6" width="399" height="20"/> </g> <g transform="translate(75 70)" fill="#fff" stroke="#c6c8c9" stroke-linecap="square" stroke-linejoin="bevel"> <path d="m0.5005 5.0005c0-2.4853 2.0147-4.5 4.5-4.5h401c2.485 0 4.5 2.0147 4.5 4.5v21.999c0 2.4853-2.015 4.5-4.5 4.5h-401c-2.4853 0-4.5-2.0147-4.5-4.5v-21.999z" fill-rule="evenodd"/> </g> <g transform="translate(75 70)" fill="none" stroke="#232629" stroke-linecap="square" stroke-linejoin="bevel"> <text x="8" y="20.8906" fill="#232629" font-family="Monospace" font-size="10" font-weight="400" stroke="none" xml:space="preserve">Roke</text> </g> <g transform="translate(14 108)" fill="none" stroke="#232629" stroke-linecap="square" stroke-linejoin="bevel"> <text y="20.5469" fill="#232629" font-family="Monospace" font-size="10" font-weight="400" stroke="none" xml:space="preserve">Number:</text> </g> <g transform="translate(75 108)" fill="#fff" stroke="#c6c8c9" stroke-linecap="square" stroke-linejoin="bevel"> <path d="m0.5005 5.0005c0-2.4853 2.0147-4.5 4.5-4.5h46.999c2.4853 0 4.5 2.0147 4.5 4.5v21.999c0 2.4853-2.0147 4.5-4.5 4.5h-46.999c-2.4853 0-4.5-2.0147-4.5-4.5v-21.999z" fill-rule="evenodd"/> </g> <g transform="translate(75 108)" fill="none" stroke="#444749" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2" stroke-width="1.001"> <polyline points="40.5 12.5 45 8 49.5 12.5" fill="none"/> </g> <g transform="translate(75 108)" fill="none" stroke="#444749" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2" stroke-width="1.001"> <polyline points="40.5 19.5 45 24 49.5 19.5" fill="none"/> </g> <g transform="translate(81 114)" fill="#fff"> <rect width="31" height="20"/> </g> <g transform="translate(81 114)" fill="none" stroke="#232629" stroke-linecap="square" stroke-linejoin="bevel"> <text x="2" y="14.8906" fill="#232629" font-family="Monospace" font-size="10" font-weight="400" stroke="none" xml:space="preserve">42</text> </g> <g transform="translate(30 146)" fill="none" stroke="#232629" stroke-linecap="square" stroke-linejoin="bevel"> <text y="20.5469" fill="#232629" font-family="Monospace" font-size="10" font-weight="400" stroke="none" xml:space="preserve">Mode:</text> </g> <g transform="translate(75 146)" fill="none" stroke="#000" stroke-linecap="square" stroke-linejoin="bevel" stroke-opacity=".125" stroke-width="1.001"> <path d="m1.5015 6.001c0-2.485 2.0145-4.4995 4.4995-4.4995h64.998c2.485 0 4.4995 2.0145 4.4995 4.4995v20.999c0 2.485-2.0145 4.4995-4.4995 4.4995h-64.998c-2.485 0-4.4995-2.0145-4.4995-4.4995v-20.999z" fill-rule="evenodd"/> </g> <g transform="translate(75 146)" fill="#fcfcfc" stroke="#d1d1d2" stroke-linecap="square" stroke-linejoin="bevel" stroke-width="1.001"> <path d="m1.5015 6.0015c0-2.4853 2.0147-4.5 4.5-4.5h64.997c2.4853 0 4.5 2.0147 4.5 4.5v19.997c0 2.4853-2.0147 4.5-4.5 4.5h-64.997c-2.4853 0-4.5-2.0147-4.5-4.5v-19.997z" fill-rule="evenodd"/> </g> <g transform="translate(75 146)" fill="none" stroke="#444649" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2" stroke-width="1.001"> <polyline points="60.5 14.5 65 19 69.5 14.5" fill="none"/> </g> <g transform="translate(75 146)" fill="none" stroke="#232629" stroke-linecap="square" stroke-linejoin="bevel"> <text x="7" y="21.0469" fill="#232629" font-family="Monospace" font-size="10" font-weight="400" stroke="none" xml:space="preserve">Alpha</text> </g> <g transform="translate(75 184)" fill="#fcfcfc" stroke="#a6a6a6" stroke-linecap="square" stroke-linejoin="bevel" stroke-width="1.001"> <path d="m2.5005 7.5005c0-2.2091 1.7909-4 4-4h6.999c2.2091 0 4 1.7909 4 4v6.999c0 2.2091-1.7909 4-4 4h-6.999c-2.2091 0-4-1.7909-4-4v-6.999z" fill-rule="evenodd"/> </g> <g transform="translate(75 184)" fill="#a6a6a6" fill-opacity=".33001" stroke="#a6a6a6" stroke-linecap="square" stroke-linejoin="bevel" stroke-width="1.001"> <path d="m2.5005 7.5005c0-2.2091 1.7909-4 4-4h6.999c2.2091 0 4 1.7909 4 4v6.999c0 2.2091-1.7909 4-4 4h-6.999c-2.2091 0-4-1.7909-4-4v-6.999z" fill-rule="evenodd"/> </g> <g transform="translate(75 184)" fill-opacity="0" stroke="#232629" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2" stroke-width="2.002"> <path d="m6 11 3 3 5.5-5.5" fill-rule="evenodd"/> </g> <g transform="translate(75 184)" fill="none" stroke="#232629" stroke-linecap="square" stroke-linejoin="bevel"> <text x="24" y="16.0469" fill="#232629" font-family="Monospace" font-size="10" font-weight="400" stroke="none" xml:space="preserve">Enable feature</text> </g> <g transform="translate(6 220)" fill="none" stroke="#232629" stroke-linecap="square" stroke-linejoin="bevel"> <text y="22.0469" fill="#232629" font-family="Monospace" font-size="10" font-weight="400" stroke="none" xml:space="preserve">This interface is rendered directly into SVG.</text> </g> <g transform="translate(6 260)" fill="none" stroke="#000" stroke-linecap="square" stroke-linejoin="bevel" stroke-opacity=".125" stroke-width="1.001"> <path d="m1.5015 6.001c0-2.485 2.0145-4.4995 4.4995-4.4995h476c2.485 0 4.5 2.0145 4.5 4.4995v22.999c0 2.485-2.015 4.4995-4.5 4.4995h-476c-2.485 0-4.4995-2.0145-4.4995-4.4995v-22.999z" fill-rule="evenodd"/> </g> <g transform="translate(6 260)" fill="#fcfcfc" stroke="#d1d1d2" stroke-linecap="square" stroke-linejoin="bevel" stroke-width="1.001"> <path d="m1.5015 6.0015c0-2.4853 2.0147-4.5 4.5-4.5h476c2.485 0 4.5 2.0147 4.5 4.5v21.997c0 2.4853-2.015 4.5-4.5 4.5h-476c-2.4853 0-4.5-2.0147-4.5-4.5v-21.997z" fill-rule="evenodd"/> </g> <g transform="translate(6 260)" fill="none" stroke="#232629" stroke-linecap="square" stroke-linejoin="bevel"> <text x="205.016" y="22.0469" fill="#232629" font-family="Monospace" font-size="10" font-weight="400" stroke="none" xml:space="preserve">Export SVG</text> </g> <g fill="none" stroke="#232629" stroke-linecap="square" stroke-linejoin="bevel"> <text x="10.0156" y="20.0469" fill="#232629" font-family="Monospace" font-size="10" font-weight="400" stroke="none" xml:space="preserve">Export SVG</text> </g> <g transform="translate(0 2)" fill="none" stroke="#808080" stroke-linecap="square" stroke-linejoin="bevel"> <polyline points="10 24 88 24" fill="none"/> </g> </g> </svg> Thanks, @GrecKo! Now, I need to ascertain how feasible this is to attach to other applications, after they've been compiled. Perhaps, I'll need a kind of DLL injection software.
  • Having trouble building Qt 6 from source

    Unsolved
    25
    0 Votes
    25 Posts
    5k Views
    SGaistS
    In that case, I would use a virtual environment with the stuff specific to Qt.
  • Building QT 6.11.0 for Win32 platform

    Unsolved
    6
    0 Votes
    6 Posts
    906 Views
    Christian EhrlicherC
    See https://doc.qt.io/qt-6/supported-platforms.html#windows https://doc.qt.io/qt-6.8/windows.html https://doc.qt.io/archives/qt-6.2/windows.html
  • 0 Votes
    5 Posts
    2k Views
    Z
    Ok. WIll try. Thank you .
  • qtpropertybrowser with Qt6

    Unsolved
    6
    0 Votes
    6 Posts
    4k Views
    M
    I think you'd find it easier to work with this PropertyGrid instead, it supports both Qt5 / Qt6 at the same time with a very Minimal and stable API while still being very customizable
  • Qt C++ used for eddyfi capture

    Unsolved
    2
    0 Votes
    2 Posts
    404 Views
    SGaistS
    Hi and welcome to devnet, The most simple way to do it is to ask the people behind the software you are interested in.
  • Is this object destruction failure?

    Solved layout widget parent & child destructor
    4
    0 Votes
    4 Posts
    2k Views
    Christian EhrlicherC
    Don't create widgets and especially layouts on the stack at all to avoid such problems.
  • Custom Widget cannot be added to Qt Designer

    Unsolved
    7
    0 Votes
    7 Posts
    2k Views
    O
    Thank you for that hint. Maybe I'll get it figured out to get a macOS certificate for Xcode, someday, but I just don't want to spend too much effort on this. ... your link to the bug report system has the singular form not as required the plural... (just for the case you will use for other replies) ;-)
  • How can i change the background of a single tab?

    Unsolved
    7
    0 Votes
    7 Posts
    3k Views
    I
    i have overridden the paint event to do what i need. thank you very much for your help! it works now
  • Title: Qt Creator + Ninja: ninja: error: failed recompaction: Permission denied

    Unsolved
    5
    0 Votes
    5 Posts
    2k Views
    jsulmJ
    @Rohit-Sinha Please scroll up to the very first error. Or, even better, post the whole build log as text.
  • QtMultimedia on Rockchip ARM Boards?

    Solved
    6
    1 Votes
    6 Posts
    4k Views
    V
    Everyone who is trying to cross-compile Qt for Orange Pi 3B can follow this tutorial: https://github.com/vverenich/CrossCompileQtForOpi
  • How can I extract metadata from a music file?

    Solved
    8
    0 Votes
    8 Posts
    4k Views
    Esmaeil_SooanE
    Hi, You can also check out this library: 👉 QAudioTagReader It’s a Qt-friendly wrapper around TagLib for exporting audio tags.
  • QRhi software-rendering example

    Unsolved
    2
    0 Votes
    2 Posts
    2k Views
    Q
    So the solution here is not to use QRhi but the OpenGL api and setting QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL); to force LLVMPipe OpenGL software rendering https://doc.qt.io/qt-6/qtquick-rendercontrol-rendercontrol-rhi-example.html [image: e5a5d0e2-d829-4cd2-be6b-7bafa13d4b4b.png]
  • Threads in QApplication Issue with on Linux cross-compiled Qt v6.9.1

    Unsolved
    3
    0 Votes
    3 Posts
    2k Views
    Christian EhrlicherC
    So since it's a compiler bug - what should Qt do against it?
  • What of "windowsprintersupport.dll" and "qwindowsvistastyle.dll"?

    Unsolved
    6
    0 Votes
    6 Posts
    2k Views
    Christian EhrlicherC
    @Sprezzatura said in What of "windowsprintersupport.dll" and "qwindowsvistastyle.dll"?: Well... why is windeployqt adding stuff that I don't need? Because it can't determine if you load these translations or not. The normal app uses translations and therefore also the ones for the Qt libs Why does the documentation mention "printsupport", yet it doesn't appear in the windeployqt output? I would guess you don't use it in your app so windeploy knows this and does not deploy it.
  • How to update CmakeLists.txt for android build from qt5 to qt6?

    Unsolved
    1
    0 Votes
    1 Posts
    3k Views
    No one has replied