Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. Tags
    3. qt creator
    Log in to post

    • SOLVED Windows not responding on reading file from txt
      General and Desktop • qt creator qfile file read • • suslucoder  

      21
      0
      Votes
      21
      Posts
      105
      Views

      @suslucoder said in Windows not responding on reading file from txt: It works so please don't forget to mark your post as solved!
    • UNSOLVED Qt WebAssembly Unable to Build: redefinition of '__glewCreateProgram' as different kind of symbol
      Qt for WebAssembly • qt creator webassembly build failed • • ConfusedKeystrokes  

      3
      0
      Votes
      3
      Posts
      111
      Views

      @lorn-potter Thanks for getting back to me! I'm trying to build this project: https://github.com/herewegoblueno/cs1230-final Just to provide context, this works well when built for Mac. And yes I am importing GL/glew.h myself. Also by the way I've also noticed that the compilers don't recognize the standard libraries like <vector>, <map>, etc (or maybe that's just the static checker? not sure if those will result in compile time errors since I can't build due to glew anyways)
    • UNSOLVED Building to WebAssembly: redefinition of '__glewCreateProgram' as different kind of symbol
      Installation and Deployment • qt creator mac webassembly • • ConfusedKeystrokes  

      1
      0
      Votes
      1
      Posts
      77
      Views

      No one has replied

    • UNSOLVED Issue: Qt Creator can't find custom C++ QtQuick Components, but compilation still works
      QML and Qt Quick • qml qt creator qtquick qt designer qtquickcompiler • • tague  

      2
      0
      Votes
      2
      Posts
      113
      Views

      I've developed a hackish workaround - if you're frustrated by this issue too, this "fix" is ugly but might help in the short-term: I noticed that Qt Creator still recognizes the old qmlRegisterType function calls if they're invoked from main in a project. So naturally, I made a custom compiler step for qmake that generates a header file with all QML_ELEMENT-tagged classes registered in a function. First, make sure you've set up qmltypes in your project as usual - your QML_IMPORT_NAME and all that is set. Add to the bottom of MyProject.pro: type_registrar_unfucker.name = type_registrar_unfucker type_registrar_unfucker.input = TYPE_REGISTRAR_SOURCES type_registrar_unfucker.commands = python3 $$PWD/type_unfuck.py ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} $$QML_IMPORT_NAME $$QML_IMPORT_MAJOR_VERSION type_registrar_unfucker.output = ${QMAKE_FILE_IN_BASE}.h type_registrar_unfucker.clean = ${QMAKE_FILE_IN_BASE}.h type_registrar_unfucker.variable_out = HEADERS QMAKE_EXTRA_COMPILERS += type_registrar_unfucker TYPE_REGISTRAR_SOURCES += $$OUT_PWD/myproject_metatypes.json Add as type_unfuck.py in your source directory: # type unfuck # ----------- # This python script deals with the issue of Qt Creator not being able to recognize element types # registered using 'QML_ELEMENT'. # # It does so by generating a header, 'myprojectname_metatypes.h'. # Include this header ONLY in main.cpp, and then call `registerTypes()` first thing in `main`. # Then, Qt Creator will stop whining. import sys import json source_path = sys.argv[1] dest_path = sys.argv[2] import_name = sys.argv[3] import_major = sys.argv[4] with open(source_path) as f: data = json.load(f) includes = ["QtQml"] types = [] for file in data: includes.append(file["inputFile"]) for type in file["classes"]: if "classInfos" in type and {"name":"QML.Element","value":"auto"} in type["classInfos"]: types.append(type["className"]) with open(dest_path, 'w') as f: for i in includes: f.write(f'#include <{i}>\n') f.write('void registerTypes() {\n') for t in types: f.write(f'\tqmlRegisterType<{t}>("{import_name}", {import_major}, 0, "{t}");\n') f.write('}\n') Then, just add #include <myproject_metatypes.h> to your project's main.cpp and invoke registerTypes(); immediately in your main function. Build your project, then click on Tools -> QML/JS -> Reset Code Model, and Qt Creator should now recognize your custom components correctly.
    • UNSOLVED Releasing exe for 32 bit windows from a 64 bit windows qt creator
      General and Desktop • qt creator windows 10 64bit 32bit deploymet • • Ahsan Niaz  

      2
      0
      Votes
      2
      Posts
      67
      Views

      @Ahsan-Niaz said in Releasing exe for 32 bit windows from a 64 bit windows qt creator: Is it possible to add kits or whatever in my current qt creator. Yes As I already mentioned, I already have a project running perfectly on 64 bit windows. I want to create an exe that should run perfectly on 32 bit windows. Please guide me with what steps I should follow. Thanks Close Qt Creator Run MaintenanceTool.exe Select and install a 32-bit version of Qt from the MaintenanceTool Install a compatible 32-bit compiler If you're using MinGW, install it from the Qt installer If you're using MSVC, install it from Microsoft's website Open your project in Qt Creator and enable your 32-bit kit: https://doc.qt.io/qtcreator/creator-configuring-projects.html Build and deploy your application using your 32-bit kit I don't want to reinstall qt and select the packages or kits because its a headache. You don't need to reinstall Qt. You must install a new version of Qt on top of your existing installation. Recently, I had to run an exe released from 64bit windows qt creator for my client on his 32 bit windows. The bitness of Qt Creator does not matter. What's important is the bitness of your kit. (Qt Creator can manage many versions of Qt, both 32-bit and 64-bit, at the same time)
    • UNSOLVED Is there a shortcut for "select next occurrance"?
      Tools • qt creator keybindings • • Beriol  

      20
      0
      Votes
      20
      Posts
      84
      Views

      @aha_1980 Yes, I've just read the report and yes, that's exactly want I wanted to do! I'll definitely vote there, tank you! :)
    • UNSOLVED Cannot debug with GDB in Qt creator
      General and Desktop • c++ qt creator python gdb gdb error • • Msmh  

      1
      0
      Votes
      1
      Posts
      66
      Views

      No one has replied

    • UNSOLVED Add variable to project file in Qt creator
      Tools • qt creator project files code coverage project config • • VictorTime  

      3
      0
      Votes
      3
      Posts
      237
      Views

      Hello thanks for reply, Yes ctc32 is an executable and args -i m for instrumentation multi-condition code coverage. I added these lines to my project file. CodeCoverage { CTC32 += ctc32 -i m } QMAKE_CC = CTC32$$QMAKE_CXX QMAKE_CXX = CTC32$$QMAKE_CXX I really don't understand how to tell Qt creator to call ctc32 before calling g++ (or in other words ctc32 will call g++). I had a look on qmake Variable Reference but this is the only thing I got. Thank you
    • SOLVED Qt 5.15.0 Android apk deployment failure
      Installation and Deployment • qt creator apk qt 5.15 gradle • • mujeek  

      3
      0
      Votes
      3
      Posts
      284
      Views

      Thank to Qt Support who pointed out the failure cause, this issue is now solved for me. This deployment failure is due to the value that Qt Creator 14.3.0 puts in dropdown "Run" of AndroidManifest.xml editor. I left the original value "AndroidDeploy_arm64_v8a", but this value is wrong since Qt Loader can't find it in the APK. When I change it to "AndroidDeploy" my application starts.
    • UNSOLVED What library should I use for animation in Qt Widgets Application?
      General and Desktop • qt creator qwidget animation application • • ricardovaras_99  

      4
      0
      Votes
      4
      Posts
      64
      Views

      @ricardovaras_99 said in What library should I use for animation in Qt Widgets Application?: And I want to simulate water level increasing on a tank. Do you want to animate the water level (in other words, make the level rise or fall at a specific speed in real time)? Or do you just want to display the water level? (in other words, make the picture show the latest level)? If you want the latter, have a look at the Qt Quick Coffee Machine demo: Video: https://resources.qt.io/videos/built-with-qt-qt-quick-coffee-machine-demo-qtws17 Code: https://doc.qt.io/qt-5/qtdoc-demos-coffee-example.html
    • UNSOLVED Click and hold LMB
      General and Desktop • qt5 qt creator • • rktech  

      22
      0
      Votes
      22
      Posts
      109
      Views

      @rktech I don't like the syntax, that's the problem. Well I don't like python syntax either but it really beats hands down the syntax you will be looking at using native API to send external events to the game app. So if provides the features you want to bot the app, it might end up be less ugly code in python than using c++ and windows api :)
    • UNSOLVED CMake CUDA QTCreator
      Tools • qt creator cmake cuda • • Sai_b  

      2
      0
      Votes
      2
      Posts
      187
      Views

      ok late reply. found an easy fix for this. go to Tools -> Options -> Environment -> MIME Types type .cu in the Filter tab. (just to search for the right type) click on text/vnd.nvidia.cuda.csrc and clear the*.cu in the patterns tab. now type c++ in the Filter tab. click on text/x-c++src and add*.cu;*.cuh in the patters tab. dont clear whats alredy here.
    • SOLVED Qt and Android - How to launch camera by using Qandroidjniobject
      Mobile and Embedded • android qt creator camera qandroidjniobje qtandroid • • HemantZ  

      2
      0
      Votes
      2
      Posts
      124
      Views

      I solved this above problem in Qt by using Qandroidjniobject. For launching camera by using intent code is given below, QAndroidJniObject ACTION_IMAGE_CAPTURE = QAndroidJniObject::getStaticObjectField("android/provider/MediaStore", "ACTION_IMAGE_CAPTURE", "Ljava/lang/String;"); QAndroidJniObject intent("android/content/Intent", "(Ljava/lang/String;)V", ACTION_IMAGE_CAPTURE.object<jstring>()); QtAndroid::startActivity(intent.object<jobject>(), 101, this);
    • UNSOLVED How to set a link to a library in the “Link Binary With Libraries” list from a .pro file
      General and Desktop • qt creator ios libraries xcode link • • Wargos  

      4
      0
      Votes
      4
      Posts
      63
      Views

      It does not work with qmake and I would rather search the bug in the lib you link against.
    • UNSOLVED Could it be that QML_DESIGNER_IMPORT_PATH conflicts with QML_IMPORT_PATH ?
      Tools • qt creator cmake design mode • • Andreas Schacherbauer  

      1
      0
      Votes
      1
      Posts
      94
      Views

      No one has replied

    • UNSOLVED Correct usage of QML_DESIGNER_IMPORT_PATH and QML_IMPORT_PATH
      Tools • qt creator designer plugin • • Andreas Schacherbauer  

      1
      0
      Votes
      1
      Posts
      53
      Views

      No one has replied

    • SOLVED ui.qml text object needs to be edited from another .qml file
      QML and Qt Quick • qml qt creator qtquick property alias ui.qml • • texasRanger  

      6
      0
      Votes
      6
      Posts
      75
      Views

      @texasRanger said in ui.qml text object needs to be edited from another .qml file: he ui.qml file it updates in real time how do you show it on the screen ? with qmlscene tool ? if you set textItem.text : "Hello World" inside Display.qml and show it with qmlscene you will see "Hello World". but if you show DisplayForm.ui.qml you will still see "Text"
    • UNSOLVED QtCreator possibly deleted all my home folder
      Tools • qt creator bug openssl • • Edcarllos  

      2
      0
      Votes
      2
      Posts
      70
      Views

      Hi @Edcarllos, that would be a desastrous button then! Thanks for the heads-up. Here's the link to the bugreport: https://bugreports.qt.io/browse/QTCREATORBUG-24173 And good luck recovering your files! Best regards
    • UNSOLVED WebAssembly for Qt Creator
      Qt for WebAssembly • linux qt creator webassembly qt 5.15 emscripten • • tansgumus  

      5
      0
      Votes
      5
      Posts
      197
      Views

      @Falko said in WebAssembly for Qt Creator: I started with 1.39.8, but Qt Creator was always complaining that I don't use 1.39.7. I updated Qt Creator to the recent version (Qt Creator 4.12.2) but still complains even when I tried to use Emscripten1.39.7!!!
    • UNSOLVED designing window not showing
      General and Desktop • c++ qt creator • • abbou169  

      2
      0
      Votes
      2
      Posts
      213
      Views

      Hi and welcome to the forums. Go to the forms folder and click UI file or go to Widget.cpp and see if it has UI The reason the Design is disabled is that you are in main.cpp and it has no design file. So a Widget does not have to have a visual UI file. its optional. And its ok to mix both UI file and code. or just create GUI from code only. But starting out with Qt, its good to use UI files so its easier to inspect the widgets etc. Also, use shift + f4 to switch between Designer and the code. Pressing the buttons Edit / Design does not work as one would expect and show you the UI files as XML and tell you cant edit it.
    • SOLVED QtCreator 4.11.x Ignores Source Code Directory Structure with CMake
      General and Desktop • qt creator cmake • • ted dr  

      5
      0
      Votes
      5
      Posts
      133
      Views

      @ted-dr HI I hope developers would remove this feature or make it optional at least. This would become problematic with standard structured folders across multiple IDEs. Feel free to open an enhancement ticket and post link here. People can then vote for it, if they like you - feel the good old way was the best and if enough votes then it might happen :)
    • UNSOLVED Qt Creator cmake project paths
      Tools • qt creator cmake path • • Poldi  

      2
      0
      Votes
      2
      Posts
      82
      Views

      Are running this on two different computers (or VMs)? It seems there are more variables involved than just 'different version of QtCreator'. Working: Qt 5.12.2 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 8.3.0) on "xcb" OS: Ubuntu 19.04 [linux version 5.0.0-38-generic] Environment: QT_ACCESSIBILITY="1" QT_AUTO_SCREEN_SCALE_FACTOR="0" Not Working (note, QT_ACCESSIBILITY is not set): Qt 5.12.4 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 9.2.1 20191008) on "xcb" OS: Ubuntu 19.10 [linux version 5.3.0-40-generic] Environment: QT_AUTO_SCREEN_SCALE_FACTOR="0" Do you have additional KDE packages (not sure what that the 'kdedev' folder is) installed on the one that's working? Does your application depend on them? Can you run it in debugging to see where exactly it is crashing?
    • UNSOLVED Difference between Build and Run
      Mobile and Embedded • qt creator • • Bravepaulo  

      5
      0
      Votes
      5
      Posts
      128
      Views

      Hello @mcleary Thank you for your response It really cleared up things to me I am gonna check the directories, but, the way you explained makes a lot o sense to me. It saved a lot o time. Regards
    • UNSOLVED Qt Creator cmake project add application icon to Android application
      Mobile and Embedded • android qt creator cmake • • leinad18  

      2
      0
      Votes
      2
      Posts
      437
      Views

      I have similar issue. It seems that contents from ANDROID_PACKAGE_SOURCE_DIR/res are not copied, and I need them to copy for splash screen, etc. If I copy them myself with this workaround: set(ANDROID_BUID_DIR ${CMAKE_CURRENT_BINARY_DIR}/android-build) #... file(INSTALL android/ DESTINATION ${ANDROID_BUID_DIR} FILES_MATCHING PATTERN "*") res contents does appear after cmake run, but once androiddeployqt runs (after build step), all these files disappear (being deleted?)!
    • SOLVED How author is saving the RAM in HugeMap?
      General and Desktop • c++ qt creator qvector qmap ram • • Yash001  

      3
      0
      Votes
      3
      Posts
      89
      Views

      @SGaist Thank you.
    • UNSOLVED qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found, debian 9
      General and Desktop • qt creator • • lucaszanella  

      2
      0
      Votes
      2
      Posts
      197
      Views

      Hi How did you install Qt ? When using the online installer you can choose the install dir. Did you try locate libqxcb.so to see if its somewhere else? Also just to be clear. This errors come when running via Creator ? Not trying to run .exe alone. Correct ?
    • UNSOLVED Qt Creator version 4.10 .2 going unresponsive on Win10
      Tools • qt creator windows10 unresponsive • • tommy  

      8
      0
      Votes
      8
      Posts
      172
      Views

      @aha_1980 Here's how I bootstrapped new working settings for QtCreator. On Windows the settings reside in <user>\Appdata\Roaming\QtProject, which contains files QtCreator.db, QtCreator.ini and directory qtcreator with lots of subdirectories, xml files etc. Renaming that directory then running QtCreator created a new settings directory (from a template kept in the Qt distro) . After that, QtCreator started behaving normally, though of course without any memory of previous projects or kit associations. Copying the QtCreator.ini file from the renamed directory restored those memories but did not make the bad behavior come back. Apparently the root problem is an incompatibility between Qt Creator 4.10.2 and some old file in the settings folder. In my case those files were created years ago by QtCreator 3.5. And since 3.5 does not even support VC 2015, I guess it was high time for a change.
    • Learn how to create Qt Creator plugins
      Tools • qt creator plugins qtws19 • • vivaladav  

      1
      3
      Votes
      1
      Posts
      79
      Views

      No one has replied

    • SOLVED Qt Creator external tools paths
      Tools • qt creator exteranl tools • • Exotic_Devel  

      4
      0
      Votes
      4
      Posts
      113
      Views

      @Exotic_Devel said in Qt Creator external tools paths: What about the problem with qmlviewer, can you give me any suggestions? I honestly have no idea what that is. Looking in the qmlviewer.xml file, it seems to be related to Qt Quick 1, so likely a Qt 4 remnant. Regards
    • UNSOLVED How can I install Qt debug library while installing Qt creator?
      General and Desktop • linux qt creator qt 5.13.1 debug libraries gcc64 • • Yash001  

      11
      0
      Votes
      11
      Posts
      268
      Views

      A library is not an application. If you are targeting several Linux distributions, the nicest would be to provide a package using their format e.g. .deb files for Debian based distributions. As for Windows, there's no real package format. Maybe using something like conan.io might be an option. Otherwise an archive that provides your .dll, header and .lib files for the various compilers you want to support is usually good enough. However packing a full version of all your dependencies, while it sounds nice, might prove problematic. If you provide them, then you should also take care of updating them in case of security issues found during the year.
    • UNSOLVED Is Qt tool add RunPath automatically on execution file ?
      General and Desktop • linux qt creator qmake ubuntu 18.04 qt 5.13.1 • • Yash001  

      2
      0
      Votes
      2
      Posts
      206
      Views

      Hi, I think you are looking for QMAKE_RPATHDIR.
    • SOLVED How to tighten up (reduce) the row height in a table
      General and Desktop • qt creator table widget • • Sprezzatura  

      5
      0
      Votes
      5
      Posts
      609
      Views

      @mrjj Excellent! setMinimumSectionSize did the trick. setRowHeight does not seem necessary.
    • UNSOLVED How do I make my app appear on the secondary monitor?
      General and Desktop • qt creator visual studio multi monitor • • Sprezzatura  

      4
      0
      Votes
      4
      Posts
      600
      Views

      Hi, try: myWidget->setGeometry(secondScreenGeometry);
    • UNSOLVED lupdate: File ... won't be updated: it contains translation but the target language is not recognized
      Tools • qt creator translations ldupdate qt creator 4.10 • • Hitokage  

      2
      0
      Votes
      2
      Posts
      542
      Views

      @Hitokage OK looks like the new lupdate version needs additional info about the file's language so I had to add something like this: <TS version="2.1" language="cs_CZ"> Works now!
    • Deleaker: a plugin for Qt Creator to find leaks (memory, GDI, handles etc.)
      Showcase • windows qt creator plugin debugging memory leak • • Artem.Razin  

      3
      7
      Votes
      3
      Posts
      801
      Views

      @fcarney I can't beleive I missed your question. Comparing with Heob, Deleaker provides more features like taking snapshot at any moment, and comparing them later. Besides heap allocations, Deleaker also tracks COM/ActiveX/GDI/USER32 leaks etc.