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
  • error: ‘class QString’ has no member named ‘toAscii’

    Unsolved
    2
    0 Votes
    2 Posts
    2k Views
    Christian EhrlicherC
    QString::toAscii() is deprecated in Qt5 and removed in Qt6. But the documentation tells you how you can replace it.
  • Manual compilers

    Moved Unsolved
    2
    0 Votes
    2 Posts
    253 Views
    J.HilkJ
    @Wallie a wild shot in the dark here, since you don't give us much information. select QtCreator (which I'm assuming you're using) press ctrl + down arrow select the (presumably) hidden popup window. Proceed from there.
  • Qmake command is not available

    Unsolved
    6
    0 Votes
    6 Posts
    1k Views
    SGaistS
    Hi, As already suggested by @sierdzio, stop using sudo until the point of installation. Doing build as root is risky. If something goes wrong you might nuke your system without even noticing before it's too late. Which exact error do you have now ?
  • Clang goes crazy?

    Moved Solved clang
    4
    0 Votes
    4 Posts
    903 Views
    Christian EhrlicherC
    Simply disable this check for clazy in the analyzer settings. CLazy does not know if it's Qt5 or Qt6. In Qt5 QList was not optimal, in Qt6 QVector was renamed to QList ... maybe the next clazy version can somehow fiddle out what Qt version it's currently checking.
  • QtCreator

    Unsolved
    8
    0 Votes
    8 Posts
    797 Views
    sierdzioS
    Yes, I see what you mean. There is a graphical view of signals and slots but it works only for connections between UI elements. Tap F4 to get to it. But what you wrote is a great suggestion, please if you have some time report it on Qt bugtracker as a feature request!
  • QMediaPlayer playbackRate is ignored - linux debian

    Unsolved
    2
    0 Votes
    2 Posts
    330 Views
    E
    I discovered that it can be made to work, if you wait some time after it plays, and then change position of playback (even back to the same position). If you do it too soon (e.g. set position 0 right on start) then it doesn't work. Not sure what is the event on which that needs to be done to correctly apply the speed/playbackrate setting, so in worst case one can have a timer that keeps calling setposition back to current position all the time. It's kinda hack but it works. Is there a better way?
  • How can I turn off code highlighting?

    Moved Unsolved
    6
    0 Votes
    6 Posts
    469 Views
    I
    @VRonin It also was spoiled to \\A\([^/]:[^\\ When I opened the first time it was like this: https://drive.google.com/file/d/1epZFK0OGbFZEf1TAzV57XUzmobKUbao-/view?usp=sharing and I done new one in the same way. For Windows version, saving of "Ignored File Templates" also doesn't work. And this option doesn't work for highlighting in any case, because it for some "generic highlighter" and not used for case editing cpp files.
  • Cmake Configuration for Qt Cross Compilation at Raspberry Zero

    Unsolved
    3
    0 Votes
    3 Posts
    508 Views
    V
    @jsulm For me qmake projects works fine but CMake projects failed because of the following error: FAILED: Raspberrydemo : && /opt/qt5pi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -g CMakeFiles/Raspberrydemo.dir/Raspberrydemo_autogen/mocs_compilation.cpp.o CMakeFiles/Raspberrydemo.dir/main.cpp.o CMakeFiles/Raspberrydemo.dir/Raspberrydemo_autogen/EWIEGA46WW/qrc_qml.cpp.o -o Raspberrydemo -Wl,-rpath,/opt/qt5pi/sysroot/usr/local/qt5pi/lib /opt/qt5pi/sysroot/usr/local/qt5pi/lib/libQt5Quick.so.5.15.2 /opt/qt5pi/sysroot/usr/local/qt5pi/lib/libQt5Gui.so.5.15.2 /opt/qt5pi/sysroot/usr/local/qt5pi/lib/libQt5QmlModels.so.5.15.2 /opt/qt5pi/sysroot/usr/local/qt5pi/lib/libQt5Qml.so.5.15.2 /opt/qt5pi/sysroot/usr/local/qt5pi/lib/libQt5Network.so.5.15.2 /opt/qt5pi/sysroot/usr/local/qt5pi/lib/libQt5Core.so.5.15.2 && : /opt/qt5pi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.5.0/../../../../arm-linux-gnueabihf/bin/ld: warning: libGLESv2.so.2, needed by /opt/qt5pi/sysroot/usr/local/qt5pi/lib/libQt5Quick.so.5.15.2, not found (try using -rpath or -rpath-link) /opt/qt5pi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.5.0/../../../../arm-linux-gnueabihf/bin/ld: warning: libpng16.so.16, needed by /opt/qt5pi/sysroot/usr/local/qt5pi/lib/libQt5Gui.so.5.15.2, not found (try using -rpath or -rpath-link) /opt/qt5pi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.5.0/../../../../arm-linux-gnueabihf/bin/ld: warning: libz.so.1, needed by /opt/qt5pi/sysroot/usr/local/qt5pi/lib/libQt5Gui.so.5.15.2, not found (try using -rpath or -rpath-link) /opt/qt5pi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.5.0/../../../../arm-linux-gnueabihf/bin/ld: warning: libharfbuzz.so.0, needed by /opt/qt5pi/sysroot/usr/local/qt5pi/lib/libQt5Gui.so.5.15.2, not found (try using -rpath or -rpath-link) /opt/qt5pi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.5.0/../../../../arm-linux-gnueabihf/bin/ld: warning: libdouble-conversion.so.1, needed by /opt/qt5pi/sysroot/usr/local/qt5pi/lib/libQt5Core.so.5.15.2, not found (try using -rpath or -rpath-link) /opt/qt5pi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.5.0/../../../../arm-linux-gnueabihf/bin/ld: warning: libicui18n.so.63, needed by /opt/qt5pi/sysroot/usr/local/qt5pi/lib/libQt5Core.so.5.15.2, not found (try using -rpath or -rpath-link) /opt/qt5pi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.5.0/../../../../arm-linux-gnueabihf/bin/ld: warning: libicuuc.so.63, needed by /opt/qt5pi/sysroot/usr/local/qt5pi/lib/libQt5Core.so.5.15.2, not found (try using -rpath or -rpath-link) /opt/qt5pi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.5.0/../../../../arm-linux-gnueabihf/bin/ld: warning: libicudata.so.63, needed by /opt/qt5pi/sysroot/usr/local/qt5pi/lib/libQt5Core.so.5.15.2, not found (try using -rpath or -rpath-link) /opt/qt5pi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.5.0/../../../../arm-linux-gnueabihf/bin/ld: warning: libpcre2-16.so.0, needed by /opt/qt5pi/sysroot/usr/local/qt5pi/lib/libQt5Core.so.5.15.2, not found (try using -rpath or -rpath-link) /opt/qt5pi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.5.0/../../../../arm-linux-gnueabihf/bin/ld: warning: libgthread-2.0.so.0, needed by /opt/qt5pi/sysroot/usr/local/qt5pi/lib/libQt5Core.so.5.15.2, not found (try using -rpath or -rpath-link) /opt/qt5pi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.5.0/../../../../arm-linux-gnueabihf/bin/ld: warning: libglib-2.0.so.0, needed by /opt/qt5pi/sysroot/usr/local/qt5pi/lib/libQt5Core.so.5.15.2, not found (try using -rpath or -rpath-link) FYI: I have followed https://github.com/PhysicsX/QTonRaspberryPi/blob/main/qt5.14.2onRaspberrypi tutorial for crosscompiling.
  • How to disable the Strict Equality Comparison warning

    Solved
    16
    0 Votes
    16 Posts
    2k Views
    Z
    it worked for me, thanks a lot.. .
  • Horizontal scrolling in the code editor

    Solved
    3
    0 Votes
    3 Posts
    369 Views
    D
    Thanks for the update. Marking this one as solved.
  • Can't use keyboard in Qt Creator, bug?

    Unsolved
    4
    1 Votes
    4 Posts
    686 Views
    jsulmJ
    @Szymon-M-Sabat Interesting. Did you search in Fedora bug tracker (or whatever they have)?
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    51 Views
    No one has replied
  • Qt Maintenance wrong scaling on FHD resolution

    Unsolved
    1
    0 Votes
    1 Posts
    136 Views
    No one has replied
  • Automation Testing for Qt Desktop application

    Unsolved
    2
    0 Votes
    2 Posts
    298 Views
    JonBJ
    @Sumaiya Depending on your needs, are you aware that Qt has Qt Test? Not much at Is there a open source automation tool for Qt app?.
  • 0 Votes
    1 Posts
    293 Views
    No one has replied
  • 0 Votes
    2 Posts
    748 Views
    crueeggC
    Thank you. At least QStrings are shown correctly at the moment (Qt 5.15.2/Xcode 12.5). Don't forget to import the codecs together with the usual imports. import codecs Could not see any differences with the HandleCommand fixes.
  • Qt Designer creates automatic buddies letters

    Unsolved
    5
    0 Votes
    5 Posts
    371 Views
    SGaistS
    I am wondering whether it's not something Designer specific. There's nothing in the code related to QRadioButton that would explain this.
  • How to debug in a cross-compilation environment with Qt Creator using GCC?

    Unsolved
    5
    0 Votes
    5 Posts
    1k Views
    C
    So I came a little closer. Seems like I had QML-Debugging enabled in Projects -> Build -> QML debugging and profiling, which I was actually not interested in. I disabled it and then installed gdbserver on the device. I can now launch debug mode, but Valgrind still says Error reading debug symbols, plug I get a bunch of other error messages. Could not load shared library symbols for 10 libraries, e.g. /usr/local/qt5.15/lib/libQt5Quick.so.5. Use the "info sharedlibrary" command to see the complete listing. Do you need "set solib-search-path" or "set sysroot"?QML debugging is enabled. Only use this in a safe environment. Could not load shared library symbols for 3 libraries, e.g. /usr/local/qt5.15/plugins/platforms/libqxcb.so. Use the "info sharedlibrary" command to see the complete listing. Do you need "set solib-search-path" or "set sysroot"?QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-pi' Could not load shared library symbols for /usr/local/qt5.15/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so. Do you need "set solib-search-path" or "set sysroot"?Could not load shared library symbols for 2 libraries, e.g. /usr/local/qt5.15/qml/QtQuick.2/libqtquick2plugin.so. Use the "info sharedlibrary" command to see the complete listing. Do you need "set solib-search-path" or "set sysroot"?Could not load shared library symbols for /usr/local/qt5.15/qml/QtQuick/Window.2/libwindowplugin.so. Do you need "set solib-search-path" or "set sysroot"?Could not load shared library symbols for /usr/local/qt5.15/qml/QtQuick/Timeline/libqtquicktimelineplugin.so. Do you need "set solib-search-path" or "set sysroot"?Could not load shared library symbols for 3 libraries, e.g. /usr/local/qt5.15/qml/QtQuick/Controls.2/libqtquickcontrols2plugin.so. Use the "info sharedlibrary" command to see the complete listing. Do you need "set solib-search-path" or "set sysroot"?Could not load shared library symbols for /usr/local/qt5.15/qml/QtQuick/Templates.2/libqtquicktemplates2plugin.so. Do you need "set solib-search-path" or "set sysroot"?Could not load shared library symbols for /usr/local/qt5.15/plugins/xcbglintegrations/libqxcb-egl-integration.so. Do you need "set solib-search-path" or "set sysroot"?Could not load shared library symbols for /usr/local/qt5.15/plugins/imageformats/libqgif.so. Do you need "set solib-search-path" or "set sysroot"?Could not load shared library symbols for /usr/local/qt5.15/plugins/imageformats/libqicns.so. Do you need "set solib-search-path" or "set sysroot"?Could not load shared library symbols for /usr/local/qt5.15/plugins/imageformats/libqico.so. Do you need "set solib-search-path" or "set sysroot"?Could not load shared library symbols for /usr/local/qt5.15/plugins/imageformats/libqjpeg.so. Do you need "set solib-search-path" or "set sysroot"?Could not load shared library symbols for 2 libraries, e.g. /usr/local/qt5.15/plugins/imageformats/libqsvg.so. Use the "info sharedlibrary" command to see the complete listing. Do you need "set solib-search-path" or "set sysroot"?Could not load shared library symbols for /usr/local/qt5.15/plugins/imageformats/libqtga.so. Do you need "set solib-search-path" or "set sysroot"?Could not load shared library symbols for /usr/local/qt5.15/plugins/imageformats/libqtiff.so. Do you need "set solib-search-path" or "set sysroot"?Could not load shared library symbols for /usr/local/qt5.15/plugins/imageformats/libqwbmp.so. Do you need "set solib-search-path" or "set sysroot"?Could not load shared library symbols for /usr/local/qt5.15/plugins/imageformats/libqwebp.so. I guess that there is some environment variable missing on the device. I have SHELL=/bin/bash LANGUAGE=de_DE.UTF-8 NO_AT_BRIDGE=1 PWD=/home/pi LOGNAME=pi XDG_SESSION_TYPE=tty MOTD_SHOWN=pam HOME=/home/pi LANG=de_DE.UTF-8 LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36: SSH_CONNECTION=xxxx:xxxx:xxxx:xxxx::xxxx:xxxx:xxxx:xxxx 22 XDG_SESSION_CLASS=user TERM=xterm-256color USER=pi SHLVL=1 XDG_SESSION_ID=5 XDG_RUNTIME_DIR=/run/user/1000 SSH_CLIENT=xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx 37756 22 LC_ALL=de_DE.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus SSH_TTY=/dev/pts/0 TEXTDOMAIN=Linux-PAM _=/usr/bin/printenv DISPLAY=:0 XDG_SESSION_TYPE=x11 I need to find a way to let Valgrind tell me the location of the errors. Else I will be searching forever...
  • Cannot load Xcb.

    Moved Unsolved
    11
    0 Votes
    11 Posts
    6k Views
    U
    @eyllanesc Thank you that worked
  • Qt cancel build button not working

    Solved
    15
    0 Votes
    15 Posts
    1k Views
    H
    @JonB https://www.qt.io/blog/qt-creator-5.0.1-released Someone pointed this problem out in the comments. and there has already been a bug report on this. Apparently the fix will be available in 5.0.2.