Skip to content

Qt Creator and other tools

Have a question about Qt Creator, our cross-platform IDE, or any of the other tools? Ask here!
7.6k Topics 35.5k Posts
  • LUpdate not adding entry to .ts file

    Unsolved
    6
    0 Votes
    6 Posts
    627 Views
    Paul ColbyP
    @Perdrix said in LUpdate not adding entry to .ts file: and running lupdate the .ts file still has no entry for that translation :( Interesting. This looks like a pretty clear lupdate bug to me, where lupdate is failing on the cast of the n argument. For example, this doesn't work for me: auto strText = QCoreApplication::translate( "LiveEngine", "Image %1 registered: %n star(s) detected - FWHM = %2 - Score = %3\n", "IDS_LOG_REGISTERRESULTS", static_cast<int>(123) ///< This breaks lupdate? ) .arg(QString::fromWCharArray(nullptr)) .arg(0.01, 0, 'f', 2) .arg(0.02, 0, 'f', 2); And this does't work either: auto strText = QCoreApplication::translate( "LiveEngine", "Image %1 registered: %n star(s) detected - FWHM = %2 - Score = %3\n", "IDS_LOG_REGISTERRESULTS", (int)123 ///< This breaks lupdate also? ) .arg(QString::fromWCharArray(nullptr)) .arg(0.01, 0, 'f', 2) .arg(0.02, 0, 'f', 2); But this works fine (for lupdate ... I wouldn't execute the code itself ;) auto strText = QCoreApplication::translate( "LiveEngine", "Image %1 registered: %n star(s) detected - FWHM = %2 - Score = %3\n", "IDS_LOG_REGISTERRESULTS", 123 ) .arg(QString::fromWCharArray(nullptr)) .arg(0.01, 0, 'f', 2) .arg(0.02, 0, 'f', 2); And this works also: const int size = 123; auto strText = QCoreApplication::translate( "LiveEngine", "Image %1 registered: %n star(s) detected - FWHM = %2 - Score = %3\n", "IDS_LOG_REGISTERRESULTS", size ) .arg(QString::fromWCharArray(nullptr)) .arg(0.01, 0, 'f', 2) .arg(0.02, 0, 'f', 2); So I would suggest you convert your lfi.m_vStars.size() to int as a separate statement, and then report this as a bug over at https://bugreports.qt.io/ (or I can report it, if you don't get around to it) Cheers.
  • How can I add a QButtonGroup in Designer?

    Solved
    3
    0 Votes
    3 Posts
    875 Views
    PerdrixP
    @JonB Nice one - my google fu obviously failed me!
  • How to add a QScrollArea as a tab in a QTabWidget

    Unsolved
    4
    0 Votes
    4 Posts
    601 Views
    M
    @Perdrix said in How to add a QScrollArea as a tab in a QTabWidget: If I add a scroll area to the QWidget, I'm offered no way to set a layout on the QWidget It is possible but it is counter-intuitive :) add the scroll area to the tab widget right-clic on the tab widget and choose Lay out-> Lay out horizontal or vertical
  • win11 qt6.5 构建报错,之前有装其他版本的Qt,但卸载了

    Moved Unsolved
    5
    0 Votes
    5 Posts
    913 Views
    cristian-adamC
    If you try to run C:\Qt\Tools\mingw1120_64\bin\g++.exe --version from a Terminal do you get the following text: C:\Qt\Tools\mingw1120_64\bin $ g++ --version g++ (x86_64-posix-seh-rev3, Built by MinGW-W64 project) 11.2.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  • Qt Creator: How to pass ninja arguments?

    Solved
    3
    0 Votes
    3 Posts
    479 Views
    A
    @jsulm After a second try (clean project) it actually works by adding them in the "Tool arguments" text box
  • How to open PDF files per link in Qt5-Assistant-Help?

    Unsolved pdf qt assistant
    2
    1 Votes
    2 Posts
    729 Views
    S
    @SemP I have the exact same issue. Still looking for an answer. I tried using ‘file://‘ in my html href on PDFs, but it tries to open the PDF in a text editor. Older versions of Assistant had a PDF tab in preferences with a default PDF viewer configurable field, but not in this one… Still looking for a solution… I might start an http server and use http://localhost/pdffile.pdf because it will open http links in a web browser.
  • Info.plist for CMake examples contain QMAKE fields

    Unsolved
    2
    0 Votes
    2 Posts
    309 Views
    JKSHJ
    Hi, and welcome! @dankrol said in Info.plist for CMake examples contain QMAKE fields: In Qt 6 the included examples use CMAKE. However... the Info.plist file still has QMAKE fields, which prevents it from being installed on an iOS device. This is a bug in the example code. Would you be willing to open a bug report at https://bugreports.qt.io/ ? (Note: If you navigate to the example folder, you can still load the .pro file instead of the CMakeLists.txt file. This one should deploy correctly)
  • Why is this Designer form not sufficiently WYSIWYG?

    Solved
    3
    1 Votes
    3 Posts
    413 Views
    C
    I face this situation regularly as well, but I had no Idea how to form a proper clear question about it, my solution was to just stuff spacers in my forms, which seemed to work. Thank you for this clarification!
  • Compile GammaRay for specific Qt Version

    Unsolved
    2
    0 Votes
    2 Posts
    418 Views
    JoeCFDJ
    @marcus_1 I guess 5.12 comes with the distribution. If for example you installed 5.15.2 under /opt, you can do export $PATH=/opt/Qt/5.15.2/gcc_64/bin:$PATH to put 5.15.2 in front of 5.12. To confirm this qmake --version If it shows 5.15.2, you are good to go. You can also try: export Qt5_DIR=/opt/Qt/5.15.2/gcc_64/lib/cmake/Qt5 https://doc.qt.io/qt-5/cmake-get-started.html or use CMAKE_PREFIX_PATH cmake -DCMAKE_PREFIX_PATH=/opt/Qt/5.15.2/gcc_64 You will not have problem with Qt6 since I guess you have only one. Add its qmake to the path, it will be ok. or use CMAKE_PREFIX_PATH
  • Configuring VC2022 compiler in Qt Creator - _MSC_VER not set

    Solved
    4
    0 Votes
    4 Posts
    2k Views
    A
    @ortiz47 Yes, by completely cleaning the contents of the build folder. "Clean project" is not enough.
  • QT Creator: navigate to file path/line number by external tool

    Solved
    3
    0 Votes
    3 Posts
    331 Views
    alik_coA
    @Chris-Kawa Awesome, thanks!
  • QtCreator startup time is really long

    Unsolved
    2
    0 Votes
    2 Posts
    351 Views
    cristian-adamC
    Apparently there is a bug in the RHEL kernel see this forum entry.
  • Getting Icon for QToolButton to display in Designer

    Unsolved
    3
    0 Votes
    3 Posts
    392 Views
    PerdrixP
    @JoeCFD No that is correct, I copied it from a working ui file in another project
  • Add QToolBar, QChart in Qt Designer

    Unsolved
    3
    0 Votes
    3 Posts
    412 Views
    PerdrixP
    @jsulm This isn't a QMainWindow as that doesn't provide the layout I want. Promote to won't AFAICT let me promote to a Qt class, only to one of my own classes: [image: 4d861e91-2d6a-409d-a1fe-c57e291c67e5.png] So far I have hacked the ui file using the XML editor (changing the class name).
  • What is the best way to deploy my application in linux?

    Unsolved linux deploy
    11
    0 Votes
    11 Posts
    6k Views
    S
    Flatpack was already mentioned as one example. We use AppImage instead. linuxdeployqt did not include everything as expected. Hence, we use both linuxdeploy and linuxdeployqt. Here is the main part of our script: #!/bin/bash export VERSION=1.0.0 echo == Remove old AppDir. == rm -rf AppDir echo == Generate new AppDir. == ./linuxdeploy-x86_64.AppImage --appdir=AppDir --executable=../release/MyApp --desktop-file=MyApp.desktop --icon-file=MyApp.svg echo == Bundle Qt libs and create AppImage. == cd AppDir ../linuxdeployqt-v8-x86_64.AppImage MyApp.desktop -qmake=/opt/Qt/5.13.2/gcc_64/bin/qmake -appimage echo == Finish up... == mv MyApp-*-x86_64.AppImage ../MyApp-x86_64.AppImage echo == Done. == This works well across many Linux distributions. One disadvantage is that an AppImage includes all necessary Qt libraries instead of using those installed on the system. Therefore AppImages can become quite large. But they avoid most incompatibilities of different versions of dynamic libraries.
  • Qt 5.15.2 mimimun version is 6.2??

    Moved Unsolved
    15
    0 Votes
    15 Posts
    1k Views
    Y
    @yugong0216 erverthing is ok, Manually install qtcreator9.0.2, not qtcreator10.0.0
  • Adding a PaletteEditor widget in Qt Designer

    Unsolved
    2
    0 Votes
    2 Posts
    252 Views
    JonBJ
    @AM577 Qt Designer has a palette editor itself, but I don't think it offers it as a widget to put into your own Qt programs does it? Don't know if it helps, but this guy https://martchus.no-ip.biz/doc/qtutilities/classQtUtilities_1_1PaletteEditor.html has a QtUtilities::PaletteEditor Class?
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    13 Views
    No one has replied
  • [Qt Creator] Disable suggestion at the end of statement

    Solved
    2
    0 Votes
    2 Posts
    224 Views
    S
    Answering my own question... after reading the sticky topic above, it seems this behavior disappears after disabling the "ClangCodeModel" plugin.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    6 Views
    No one has replied