Skip to content

Qt 6

This is where all Qt 6 related questions belong

856 Topics 4.2k Posts
QtWS25 Last Chance
  • Can you implement dialogs on different threads?

    Solved
    5
    0 Votes
    5 Posts
    510 Views
    C
    Thank you! The website clears things up for me :)
  • Why there is a line on my dialog?

    Solved
    11
    0 Votes
    11 Posts
    843 Views
    mrjjM
    @Christina123 Well it was good you found it. No worries. Calling the base version is ultra important in most cases when using Qt so if you walk away with that knowledge extra, it was all worth it :)
  • How to convert QVector<QPainterPath> to QByteArray and convert it back?

    Solved
    2
    0 Votes
    2 Posts
    365 Views
    eyllanescE
    @Christina123 Use QDataStream: // QPainterPath to QByteArray QByteArray ba; QDataStream ds(&ba, QIODevice::WriteOnly); ds.setVersion(QDataStream::Qt_5_15); ds << path; qDebug() << ba; // QByteArray to QPainterPath QPainterPath path; QDataStream ds(ba); ds.setVersion(QDataStream::Qt_5_15); ds >> path; qDebug() << path; And knowing that QDataStream supports QVector then in your case the code doesn't change much: // QVector<QPainterPath> to QByteArray QByteArray ba; QDataStream ds(&ba, QIODevice::WriteOnly); ds.setVersion(QDataStream::Qt_5_15); ds << paths; qDebug() << ba; // QByteArray to QVector<QPainterPath> QVector<QPainterPath> paths; QDataStream ds(ba); ds.setVersion(QDataStream::Qt_5_15); ds >> paths; qDebug() << paths;
  • How to delete points from QPainterPath?

    Solved
    10
    0 Votes
    10 Posts
    1k Views
    SGaistS
    There are a lot of reasons for paintings to happen. Moving the window, having something else coming through said window, etc.
  • Why the paintevent is not working?

    Solved
    2
    0 Votes
    2 Posts
    574 Views
    Chris KawaC
    It should be paintEvent, not paintevent. When overriding virtual members use the override keyword in the header. It will help you catch typos like this. Also, since you're passing the path through a pointer, make sure that path object is still alive when paintEvent is called, otherwise that's undefined behavior.
  • Use of undeclared identifier 'connect'

    Solved
    3
    0 Votes
    3 Posts
    4k Views
    C
    @Chris-Kawa Thank you for point them out to me.
  • How to send QFrame to the back?

    Solved
    7
    0 Votes
    7 Posts
    986 Views
    SGaistS
    To ensure which are called use Q_FUNC_INFO in your debug lines. There's no need for the installEventFilter call. You cannot paint on a widget from a different one. The correct way is like you started with QFrame, then override paint event, call the base class implementation and do your own painting afterward.
  • Parsing string

    Unsolved
    5
    0 Votes
    5 Posts
    665 Views
    SGaistS
    @Ketan__Patel__0011 please do not use QRegExp, it was deprecated in Qt 5 and removed in Qt 6. Use QRegularExpression.
  • What is the best way to do this?

    Solved qt5 c++11 painteevent
    4
    0 Votes
    4 Posts
    639 Views
    jsulmJ
    @Christina123 Use mousePressEvent, it provides the cursor position as parameter https://doc.qt.io/qt-5/qwidget.html#mousePressEvent
  • qt 6.1, qml, error: "Object is not a type"

    Solved
    2
    0 Votes
    2 Posts
    1k Views
    C
    Well, turned out my qmldir was incorrect. it is strange that it worked under QT5 however. Cyrille
  • QTextCodec & Qt6::Core5Compat & Conan

    Unsolved
    2
    0 Votes
    2 Posts
    396 Views
    W
    Doh! There's a Conan option qt5compat.
  • Where is QTiffHandler ? [Qt 6.x]

    Moved Unsolved
    2
    0 Votes
    2 Posts
    299 Views
    Christian EhrlicherC
    Please read https://forum.qt.io/topic/121651/read-before-posting-in-this-category Moved to Qt6
  • 3D Install Qt6

    Solved
    79
    0 Votes
    79 Posts
    20k Views
    O
    @SGaist Please excuse my horrible grammar and form of the post. I am sure that dropping qmake_paths will work; however, it took a very long time to process until the final error, but my question was about the qt3d product that was formed: It looks complete and good. Stop! The Linux qt3d install finally worked! Here is what I used: export PATH=/home/bob/Qt/Tools/bin:/home/bob/Qt/Tools/Conan:/home/bob/Qt/Tools/Ninja:$PATH cd /home/bob/Qt/Conan3D source /home/bob/vulkan/1.2.170.0/setup-env.sh conan install qt3d/6.0.1@qt/final --build=missing --profile=/home/bob/Qt/Tools/Conan/profiles/'''qt-6.0.2-gcc-x86_64''' -s build_type=Release -g cmake_paths -g=cmake -g deploy -g=qmake To remove the conan locks I had to use: /home/bob/Qt/Tools/Conan/conan remove -l As to the Win 10 qt3d, the following lines of the Linux install make me believe that I need to redo it: qt3d/6.0.1@qt/final: Package 'a39b4915813a92b93e8b0ff2f505771141766338' created qt3d/6.0.1@qt/final: Created package revision 780334a95b0b0590268c0f5957052806 Generator txt created conanbuildinfo.txt Generator cmake_paths created conan_paths.cmake Generator qmake created conanbuildinfo.pri Generator deploy created deploy_manifest.txt Generator cmake created conanbuildinfo.cmake qt3d/6.0.1@qt/final deploy(): Copied 814 '.h' files qt3d/6.0.1@qt/final deploy(): Copied 27 '.prl' files qt3d/6.0.1@qt/final deploy(): Copied 288 files qt3d/6.0.1@qt/final deploy(): Copied 13 '.json' files qt3d/6.0.1@qt/final deploy(): Copied 9 '.o' files qt3d/6.0.1@qt/final deploy(): Copied 176 '.cmake' files qt3d/6.0.1@qt/final deploy(): Copied 12 '.1' files qt3d/6.0.1@qt/final deploy(): Copied 39 '.pri' files qt3d/6.0.1@qt/final deploy(): Copied 12 '.so' files qt3d/6.0.1@qt/final deploy(): Copied 8 '.qmltypes' files qt3d/6.0.1@qt/final deploy(): Copied 15 '.a' files qt3d/6.0.1@qt/final deploy(): Copied 12 '.6' files qt3d/6.0.1@qt/final deploy(): Copied 12 '.debug' files qt3d/6.0.1@qt/final deploy(): Copied 2 '.txt' files: conaninfo.txt, conanmanifest.txt Thanks for all your help, I am sure I will have more questions as I try writting qt3d programs.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • Where is QtWebEngine int Qt6.0.2 ?

    Moved Unsolved
    2
    0 Votes
    2 Posts
    251 Views
    Christian EhrlicherC
    Please read https://forum.qt.io/topic/121651/read-before-posting-in-this-category moved to Qt6
  • increment variable of server class for each thread

    Unsolved
    2
    0 Votes
    2 Posts
    253 Views
    jsulmJ
    @fari35 said in increment variable of server class for each thread: How can I do that? Emit a signal in each thread as soon as a new client connects. Connect a slot to that signal and increment the count variable there.
  • How to use the Conan 3D package?

    Unsolved
    2
    0 Votes
    2 Posts
    369 Views
    kkoehneK
    Check out https://wiki.qt.io/Qt6_Add-on_src_package_build_using_Conan_package_manager . The easiest setup currently is to install qt3d into the Qt SDK by running <QtSdk>/Tools/Conan/conan install qtnetworkauth/6.0.2@qt/final --build=missing --profile=<QtSdk>/Tools/Conan/profiles/<right_profile>
  • Thank you very much

    Solved
    1
    0 Votes
    1 Posts
    202 Views
    No one has replied
  • 0 Votes
    2 Posts
    227 Views
    SGaistS
    Hi and welcome to devnet, Do you have cmake installed and if so which version ? That said, /opt is usually not user writable so you should do an out of source build from somewhere you can like your home folder (doing it as root is a bad idea).
  • Unable to add external library to Qt6

    Unsolved
    6
    0 Votes
    6 Posts
    806 Views
    SGaistS
    You have a chapter in the Eigen documentation on how to use the library with a cmake project.