Skip to content

Qt 6

This is where all Qt 6 related questions belong

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

    Pinned Locked
    3
    6 Votes
    3 Posts
    2k Views
    SGaistS

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

  • 0 Votes
    6 Posts
    63 Views
    P

    @jsulm I understand now,thank you

  • This topic is deleted!

    Unsolved
    12
    0 Votes
    12 Posts
    79 Views
  • Qcache a buggy class?

    Unsolved
    9
    0 Votes
    9 Posts
    150 Views
    kshegunovK

    @FeRDNYC said in Qcache a buggy class?:

    ...Or I suppose the docs could have a general explainer page about object ownership and lifetimes, which statements like the one quoted above are linked to. Devs moving from garbage-collected languages, in particular, don't necessarily have that background.

    Qt is a library, and as @Christian-Ehrlicher mentioned, it's not any library's concern to teach you the underlying language - it is assumed that you're going to be using the library after you understand the basis of its existence.

    I can see how if you are coming from a garbage-collected language this may sound unfair, but if you think about it for a while I think you'd agree that C++ is too large and too complex for you to require from Qt (developers) to feed you information about the language too.

    Note: I'm liberally using "you", but do consider it as using the indefinite pronoun form.

  • 0 Votes
    2 Posts
    47 Views
    SGaistS

    Hi,

    The iOS platform notes give a hint for that.

  • Qt for ios save file error? why?

    Unsolved
    5
    0 Votes
    5 Posts
    213 Views
    K

    @jsulm Hello, I found that I need to use oc and qt for mixed compilation, but I can't add the Foundation framework in cmake. How should I add it?

    I checked the information and he said that iOS can only read and write at the location "QStandardPaths::standardLocations(QStandardPaths::DocumentsLocation).last()"

  • Qt 3d example error

    Unsolved
    15
    0 Votes
    15 Posts
    246 Views
    R

    @jsulm ok thank you for the help. Indeed grateful.

  • Qt Creator build error on Windows

    Unsolved
    13
    0 Votes
    13 Posts
    194 Views
    A

    @cristian-adam
    Thanks Cristian!
    I'll check this out.... ✌️

  • Not able to override delegate model, index

    Unsolved
    5
    0 Votes
    5 Posts
    106 Views
    Axel SpoerlA

    @Ash-V
    Hi,
    index is set to -5, model is set to {}, which means it's an empty, default constructed model.
    Regardless if overridden or not, modelneither has a name, nor a typeproperty.
    So I don't quite see the problem here.
    Which value would you expect the properties to have?

  • QMediaPlayer doesn't play sound 6.6.3

    Unsolved
    5
    0 Votes
    5 Posts
    94 Views
    JonBJ

    @Dilabun
    I had not looked closely at your code, but what @Ketan__Patel__0011 has written is certainly correct. If that is really the code you have been trying you have created two quite separate QAudioOutputs. The one in audioOutput whose volume you set is not the one which is player's output. So start by sorting that out!

  • 0 Votes
    5 Posts
    124 Views
    JoeCFDJ

    @marisol Looks like gradle version mismatch. Read the links in my post above carefully and try to use the right versions for all packages.

  • qt5.15.2 + vs 2022 static build error,please help me

    Unsolved
    2
    0 Votes
    2 Posts
    355 Views
    Z

    You can try to install new version of Strawberry Perl. Perl is used to generate qmimeprovider_database.cpp as indicated by file "qtbase\src\corelib\mimetypes\mimetypes.pri".

    mimedb.depends = $$PWD/mime/generate.pl equals(MAKEFILE_GENERATOR, MSVC.NET)|equals(MAKEFILE_GENERATOR, MSBUILD)|isEmpty(QMAKE_SH) { mimedb.commands = cmd /c $$shell_path($$PWD/mime/generate.bat) mimedb.depends += $$PWD/mime/generate.bat $$PWD/mime/hexdump.ps1 } else { mimedb.commands = perl $${mimedb.depends} }

    Refer to https://www.qtcentre.org/threads/71253-Static-Build-Issue-on-QT-5-15-0?p=309507#post309507

    Then, if "qmimeprovider_database.cpp" is generated correctly, the compilation works.

  • qtpropertybrowser with Qt6

    Unsolved
    5
    0 Votes
    5 Posts
    645 Views
    F

    @Dragoner said in qtpropertybrowser with Qt6:

    -Wa,-mbig-obj

    (This is ONE compiler flag, so the comma is not a typo!)

    Correct. Specifically, it says that the compiler should pass the comma-separated list of arguments that follows (-mbig-obj) to the assembler (-Wa), when it gets run.

    There are also -Wp, flags, to pass arguments to the preprocessor stage, and -Wl, flags, when an option needs to go to the linker.

    In gcc , at least, the -Xassembler, -Xpreprocessor, and -Xlinker flags can be used to do the same thing one argument at a time, without comma-separating them.

    (e.g. these are equivalent:)

    $ gcc -Xassembler -mbig-obj ... $ gcc -Wa,-mbig-obj ...
  • QtMultimedia

    Unsolved
    2
    0 Votes
    2 Posts
    79 Views
    SGaistS

    Hi and welcome to devnet,

    AFAIK, you can't.

  • OpenCV integration with Qt6

    Solved
    14
    0 Votes
    14 Posts
    3k Views
    D

    @cristian-adam After spending 6 hours trying to set up OpenCV with Qt6 while following several tutorials (only to find out that it all does not apply to Qt6), your solution worked perfectly fine.

    I should only add that I struggled with Qt Creator GUI looking for cmake project settings to change CMAKE_PREFIX_PATH. but finally got it (CTRL+5) ,
    Just bookmarked this thread for good.

    many thanks for this!

  • Online installer 4.7.0 not working

    Solved
    3
    0 Votes
    3 Posts
    90 Views
    JonBJ

    @Ash-V Under Linux never type a capital/upper-case letter unless you have a very good reason for doing so.

  • pixmap.loadfromdata fails using QT6.6.1

    Solved
    13
    0 Votes
    13 Posts
    200 Views
    R

    @JonB

    That fixed it! Thanks Christian and Jon for your help.

    Sorry to be such a pain Christian.

    Rick

  • Qt 6 undefined reference to `qMain(int, char**)'

    Unsolved
    13
    0 Votes
    13 Posts
    665 Views
    Q

    There's a conflict between your code and a macro #define main qMain defined in include/QtGui/qwindowdefs.h
    which is used to avoid a console window in a Qt project (as per https://stackoverflow.com/a/18553402). You can rename any variables in your code named main or reduce/rearrange includes as others have proposed.

  • Problems with QSerialPort

    Unsolved
    6
    0 Votes
    6 Posts
    212 Views
    aha_1980A

    This lead to QTBUG-123768

  • compile Qt 6.5.3 Src fail

    Unsolved
    2
    0 Votes
    2 Posts
    92 Views
    Axel SpoerlA

    @pedisChen
    See this post.