Skip to content

Qt 6

This is where all Qt 6 related questions belong

828 Topics 4.0k Posts
  • 0 Votes
    4 Posts
    606 Views
    JKSHJ

    @Mesrine said in Cmake recompile qml modules even if the qml files did not change.:

    Is there a way to stop this behavior?

    You have 2 options:

    Use the Ninja generator instead of the Makefile generator (recommended), OR Upgrade to Qt 6.5.2 (see https://bugreports.qt.io/browse/QTBUG-106683 )

    Note that Qt 6.5.2 no longer causes the Makefile generator to rebuild the *.o and *.so files unnecessarily, but there are still other inefficiencies: https://bugreports.qt.io/browse/QTBUG-115166

    @d_h_mcinnes said in Cmake recompile qml modules even if the qml files did not change.:

    I notice that if I build my project from the command line, it rebuilds the .qml files every time. However, if I build from inside qtcreator, it only rebuilds when necessary.

    It sounds like Qt Creator uses the Ninja generator but your command line does not.

  • how to use qmltc with Qt6.4

    Unsolved
    3
    0 Votes
    3 Posts
    1k Views
    J

    sudo apt-get install build-essential libgl1-mesa-dev

    solved the issue for me.

  • 0 Votes
    4 Posts
    361 Views
    S

    @jsulm

    Here is Reproducible Example

    #include <QApplication> #include <QSslServer> #include <QDialog> #include <QSslKey> #include <QMessageBox> int main(int argc, char **argv) { // create an Application QApplication app(argc, argv); // set the ssl configuration auto config = QSslConfiguration(); // set certificate config.setLocalCertificate(QSslCertificate::fromData(QByteArray::fromStdString(R"( -----BEGIN CERTIFICATE----- MIIDITCCAgmgAwIBAgIVAMdt4c6oGd0rUSbR+/tBVfhny3K3MA0GCSqGSIb3DQEB BQUAMEoxGDAWBgNVBAMMD0xBUFRPUC1KQzJNMzcyQTEbMBkGA1UECgwSc3JpbGFr c2htaWthbnRoYW5wMREwDwYDVQQLDAhjbGlwYmlyZDAeFw0yMzA5MDgxMTQ4NDZa Fw0yNDA5MDcxMTQ4NDZaMEoxGDAWBgNVBAMMD0xBUFRPUC1KQzJNMzcyQTEbMBkG A1UECgwSc3JpbGFrc2htaWthbnRoYW5wMREwDwYDVQQLDAhjbGlwYmlyZDCCASIw DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALkFDUKmzz+NE0x7o5JGgE8KZ/cB GEtTwN2cElMESQ/MZe3ohIE5GdFkld/7894wXZAJkXu38oZVEQ/AurntqqSHT4iP 7qMUJGYjo2v2g/1JwU3E/sG+IjatOjyl8b0b+E9TmDt7XOS4VWz3vjTkXwmQTzUv 3L5myfdcmBpA9AOXxH8yHq9lcBl97ZHGWA4zI9uWnwtyFWSl8DX4H/y14+itEYwH n6xLsEBxqjx40G7WR0AiAYRdE5Yvr6QOGtFAeODFqOv/2sAxdm/7P1wHjIvyOB++ eufvPyWZpzeBfEvrIeGkj91YGAV7FQsOfCuzetGgZcLiBDAZKjnKEQ2oajUCAwEA ATANBgkqhkiG9w0BAQUFAAOCAQEAD/SYccAb3K6GKyfc9Rbaj44IxpsNlHDQAr5b c8Nmz+LW905EqFe6tAhCgi3q9o3HUUeiNHe0rYad3Lgd1setSOVdWiSbxArmELgW Dg3NGd3GIIRShvmZfSHRkpvKaD9j06CVzMrM0nZsjQVcQrKlFBUJ9UEqVmmcz1nU a4yUEQ9Rb7t4Icw7aD07NqLRlhNGCii4d12NAY7kRZdLdtTw7T/j4tXxmcJsOiWK Lx/cqqTBgBHc3l3EeylQdO17pFClY5yMUGGla7LPcDm1sU4mmFEKmkjcRGu+mQM2 V3EDgh37GyTWvs6Zf86B14m/US0Ff4vQu26vco5Pjk3xKckA+Q== -----END CERTIFICATE----- )")).first()); // set private key config.setPrivateKey(QSslKey(QByteArray::fromStdString(R"( -----BEGIN RSA PRIVATE KEY----- MIIEpAIBAAKCAQEAuQUNQqbPP40TTHujkkaATwpn9wEYS1PA3ZwSUwRJD8xl7eiE gTkZ0WSV3/vz3jBdkAmRe7fyhlURD8C6ue2qpIdPiI/uoxQkZiOja/aD/UnBTcT+ wb4iNq06PKXxvRv4T1OYO3tc5LhVbPe+NORfCZBPNS/cvmbJ91yYGkD0A5fEfzIe r2VwGX3tkcZYDjMj25afC3IVZKXwNfgf/LXj6K0RjAefrEuwQHGqPHjQbtZH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vTJTvdF74wUINBxya5+27gBmxBmsdXBbs4B7PZ971skQrSPcJOYgUK5ZbetHACj l8MfFwKBgQC3g39rKU/iahrr5VcbLecsdv9jhSo+PANQOXhreEZTOF1spsWh9bMN 11MB0uZu99p4Solvv0M11Md++CO3ocBRT0AsdsdLdytAb+YWM+c1ls5dhjVnaMpL dKKHiQ7sfiPM05f6HuTmMuinSLw7f1Ff7GVJUMugJCqiNn3XO3jWGQ== -----END RSA PRIVATE KEY----- )"), QSsl::KeyAlgorithm::Rsa)); // peer verify config.setPeerVerifyMode(QSslSocket::VerifyPeer); // if any of them is null if (config.isNull() || config.localCertificate().isNull() || config.privateKey().isNull()) { throw std::runtime_error("Can't Create QSslConfiguration"); } const auto processSslErrors = [=] (QSslSocket * sock, const QList<QSslError> & errors){ // create a dialog auto dialog = QMessageBox(QMessageBox::Critical, "SSL Error", "Accept ?", QMessageBox::Yes | QMessageBox::Cancel); // show the dialog dialog.exec(); // if user accepted if (dialog.result() == QMessageBox::Yes) { sock->ignoreSslErrors(); } }; // create the server auto server = new QSslServer(); // set the ssl errors handler QObject::connect(server, &QSslServer::sslErrors, processSslErrors); // set the ssl configuration server->setSslConfiguration(config); // listen to the port server->listen(QHostAddress::Any, 7000); // exec return app.exec(); }

    In Client Side:

    openssl s_client -connect 127.0.0.1:7000

    You can see the client disconnected while the dialog is in open

  • Working with IANA Chatacter Sets in Qt6

    Unsolved
    2
    0 Votes
    2 Posts
    143 Views
    Christian EhrlicherC

    You should create a bug report about this. In the meanwhile you can use the qt5compat module - it will not go away until Qt7.

  • Qt IOS Build Size

    Unsolved
    2
    0 Votes
    2 Posts
    182 Views
    jsulmJ

    @NullByte Did you make sure you built in release mode?

  • Qt 6.5 Cmake iOS Objective-C Example

    Solved
    3
    0 Votes
    3 Posts
    266 Views
    ?

    @SGaist I made it bro thanks to you

  • This topic is deleted!

    Unsolved
    2
    0 Votes
    2 Posts
    25 Views
  • 0 Votes
    9 Posts
    1k Views
    FeRDNYCF

    @Vlogo11 What do you mean you "have the same problem"? What problem do you have? Have you even built your application yet?

    (Because, the fact that you're using a .pro file should be irrelevant, windeployqt is run on the .exe file that results from building your application. Whether you're using CMake or qmake, you need to generate a build system and compile your application before you can do anything with windeployqt.)

    Once you have an application executable, just run windeployqt myapplication.exe on the compiled program. If you don't have any QML then you don't even need to worry about --qmldir at all.

  • Error with toULong() in Windows Qt 6.5.1

    Unsolved
    4
    0 Votes
    4 Posts
    209 Views
    Christian EhrlicherC

    That's why Qt introduced the qt fixed integer types by themself. the toULong() stuff is an relict from old Qt times and imho should have been replaced a long time ago with functions returning fixed integer types (or the qt fixed integer types).

  • My post request body is missing

    Unsolved
    2
    0 Votes
    2 Posts
    185 Views
    SGaistS

    Hi and welcome to devnet,

    What exactly are you talking about ?
    How are you sending that request ?
    How are you building it ?
    Which version of Qt are you using ?
    On which platform ?

  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • error when download the latest version of QT

    Unsolved
    1
    0 Votes
    1 Posts
    126 Views
    No one has replied
  • Ninja error building Qt 6.5 from source

    Unsolved
    7
    0 Votes
    7 Posts
    1k Views
    Z

    @JoeCFD

    Thanks for your message ... yes ... I had installed Ninja v1.11.1 prior to the configuration.
    Got it working by using a locally mounted drive (see below).

  • Muti Selection in PyQt6?

    Unsolved
    5
    0 Votes
    5 Posts
    633 Views
    JonBJ

    @bebewinla
    As I suggested, the enumerated type namespaces have changed, you need to use the correct ones in PyQt6.

    Also I don't think it's usual to access a enumerated value via self, e.g. like self.ExtendedSelection, I don't know whether Python allows this.

  • 0 Votes
    7 Posts
    1k Views
    JoeCFDJ

    @jiapei100 check here out about configure settings:
    http://bin.ceicer.com/qt/Linux/

    Just curious: why do you want to build 6.5.1 on Ubuntu 22.04? You can simply install it.

  • 0 Votes
    2 Posts
    192 Views
    SGaistS

    Hi,

    llvm is used for QDoc to parse and analyse client code. It's not related to the compilation of Qt itself where you can use gcc or clang based on your preference and its availability.

  • error: QSqlDatabase: No such file or directory

    Unsolved
    2
    0 Votes
    2 Posts
    384 Views
    N

    Hello, All!

    I add Sql to this line:
    target_link_libraries(PrabhupadaDictionary PRIVATE Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Sql)

    And this problem disappeared. Others appeared. Thanks! I will continue to correct the program "Srila Prabhupada's Dictionary", which was originally written in CopperSpice.

    Thank You very much!
    With best regards, NavadvipaChandra das.

  • 0 Votes
    1 Posts
    182 Views
    No one has replied
  • When will Qt 6.5.2 be released?

    Unsolved
    4
    0 Votes
    4 Posts
    266 Views
    M

    @SGaist thanks a lot

  • What I'm doing wrong with "BASE" in qt6_add_resources

    Solved
    3
    0 Votes
    3 Posts
    236 Views
    K

    @Christian-Ehrlicher said in What I'm doing wrong with "BASE" in qt6_add_resources:

    Nothing on your disk, it affects the location in the resource file.

    Oh crap.
    All right, that's an important hint that I now understand.
    Thank you very much!