Skip to content

Qt 6

This is where all Qt 6 related questions belong

840 Topics 4.1k Posts
  • QProperty; binding and onValueChanged

    Unsolved
    6
    0 Votes
    6 Posts
    924 Views
    kshegunovK

    @Eirik said in QProperty; binding and onValueChanged:

    order of calls seems not to matter

    It may be a bug, I suggest you post on the interest mailing list where this can get more exposure (you can reference this forum thread in your mail).

  • QML var property created from by python class

    Unsolved
    1
    0 Votes
    1 Posts
    291 Views
    No one has replied
  • How to properly delete QThread?

    Solved
    2
    0 Votes
    2 Posts
    453 Views
    Christian EhrlicherC

    You have to wait() until the thread had time to shut down. Also you should not connect Sender::finished to deleteLater but the QThread's finished signal to deletedLater.

  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • Can you implement dialogs on different threads?

    Solved
    5
    0 Votes
    5 Posts
    409 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
    692 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 :)

  • 0 Votes
    2 Posts
    323 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
    533 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
    863 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
    605 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
    4
    0 Votes
    4 Posts
    584 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
    347 Views
    W

    Doh! There's a Conan option qt5compat.

  • Where is QTiffHandler ? [Qt 6.x]

    Moved Unsolved
    2
    0 Votes
    2 Posts
    253 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
    18k 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
    217 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
    223 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.