QtCreator 7.0.2 with PySide2 / Qt5
-
Hi there. I am trying to use QtCreator 7.0.2 on Windows 10 with Qt5 with a QML front end and Python/PySide2 and having no luck. I need to use Qt5 because I need QtLocation. When I do the default install of Qt6 with the unified installer, I can run my project and use the Form Editor, but of course Qt6 doesn't have QtLocation. As soon as I install Qt5 (5.15.2), I can no longer use the form editor in Qt Creator. I get an error 'Line 0: The Design Mode requires a valid Qt kit'. Furthermore, I can run my project, but Qt Creator doesn't recognize QtLocation even though I see the folder for it in the install directory. I have read that the Line 0 error means you need to select the correct Qt, but I go into Tools->Options->Kits and select Qt 5.15.2 MinGW 64-bit in kits, set that as default and in the Qt tab I link C:\Qt\5.15.2\mingw81_64\bin\qmake.exe to Qt but it doesn't make any difference.
What am I doing wrong? I just want to be able to use QtLocation in Qt Creator 7.0.2. Thank you for your help, I have been working at this for a couple days trying different combinations and getting nowhere.
-
I found out that the Line 0: error was because when you install Qt 5.15.2 you need to make sure you at least select:
MSVC 2019 32-bit and 64-bit, MinGW 8.1.0 64-bit, and UWP x64 (MSVC 2019). But it is still not working. The preview appears three times in floating windows but the widget outlines appear in the main window. There is no way to select widgets on the preview. -
Hi there. I am trying to use QtCreator 7.0.2 on Windows 10 with Qt5 with a QML front end and Python/PySide2 and having no luck. I need to use Qt5 because I need QtLocation. When I do the default install of Qt6 with the unified installer, I can run my project and use the Form Editor, but of course Qt6 doesn't have QtLocation. As soon as I install Qt5 (5.15.2), I can no longer use the form editor in Qt Creator. I get an error 'Line 0: The Design Mode requires a valid Qt kit'. Furthermore, I can run my project, but Qt Creator doesn't recognize QtLocation even though I see the folder for it in the install directory. I have read that the Line 0 error means you need to select the correct Qt, but I go into Tools->Options->Kits and select Qt 5.15.2 MinGW 64-bit in kits, set that as default and in the Qt tab I link C:\Qt\5.15.2\mingw81_64\bin\qmake.exe to Qt but it doesn't make any difference.
What am I doing wrong? I just want to be able to use QtLocation in Qt Creator 7.0.2. Thank you for your help, I have been working at this for a couple days trying different combinations and getting nowhere.
@Mlibu said in QtCreator 7.0.2 with PySide2 / Qt5:
'Line 0: The Design Mode requires a valid Qt kit'.
This suggests that you have not configured an appropriate kit for your project.
I go into Tools->Options->Kits and select Qt 5.15.2 MinGW 64-bit in kits, set that as default and in the Qt tab I link C:\Qt\5.15.2\mingw81_64\bin\qmake.exe to Qt but it doesn't make any difference.
This option is about which kits are available on your machine, not which kit(s) are enabled for a specific project.
See https://doc.qt.io/qtcreator/creator-configuring-projects.html to set a kit for your project.
-
Thank you for the kick in the right direction. On this page, every Run entry has a blank executable and comment line argument fields. The instructions you sent don't really explain what arguments to use nor can I find anything with Google. Is this expected? That all the binaries and flags need to be entered manually?
-
This link has a picture of what I am getting:
I don't agree with the Reddit device to "not use Qt Creator". Hoping I can get a better answer here.
-
Thank you for the kick in the right direction. On this page, every Run entry has a blank executable and comment line argument fields. The instructions you sent don't really explain what arguments to use nor can I find anything with Google. Is this expected? That all the binaries and flags need to be entered manually?
@Mlibu said in QtCreator 7.0.2 with PySide2 / Qt5:
On this page, every Run entry has a blank executable and comment line argument fields. The instructions you sent don't really explain what arguments to use nor can I find anything with Google. Is this expected? That all the binaries and flags need to be entered manually?
No, this is not expected. It should all be automatic.
Try this:
- Close Qt Creator
- Delete the *.user file in your project folder
- Open your project in Qt Creator again. You should now see a dialog about configuring your kit -- pay close attention to it.
@Mlibu said in QtCreator 7.0.2 with PySide2 / Qt5:
This link has a picture of what I am getting:
I don't agree with the Reddit device to "not use Qt Creator". Hoping I can get a better answer here.
This is a completely different problem to your kit issue.
The Reddit post says there is no dedicated GPU, which might be the reason. The QML Form Editor uses Qt Quick, which uses GPUs.
Is your machine able to run a QML/Qt Quick application? What is your OS, and GPU version? Is this a physical machine or a virtual machine?
-
Ok now I'm trying this on my Mac.
It is not working on my mac either. It is doing the same thing. At first I had invalid kit, but I set the kit to Desktop Qt clang 64bit and now I only get the outlines. Please help, I have never had this much trouble setting up a development environment.
I found this thread: https://forum.qt.io/topic/135163/qml-component-not-displaying-in-designer
It has this bug report: https://bugreports.qt.io/browse/QDS-6487, and the bug is "Not Evaluated".
Does that mean Qt Creator doesn't work on mac either?
I tried Design Studio but there doesn't seem to be any Python or Qt5 support there.
Hold on.. I've just thought of something... This was working on my Thinkpad T490 with Qt6. I only have the problem when I try to use Qt5. Is it possible that form editor with Qt6 would work but with Qt5 it would not?
-
I made progress... I installed every compiler under Qt 5 and with only MSVC2015 64-bit active the form editor seems to be working on my Thinkpad.
I'm not sure if my project setting page is working properly though. I can't see any way to know what kits are active other than to right click on each one in the left menu and and see if there is a menu entry for 'enable' or 'disable' and it took me a long time to understand that. A couple times a page popped up with a list of the compilers and a check mark with 'configure project' at the bottom, but it happened on its own and I have no idea how to bring that page up.
Anyhow I muddled through and hopefully it is working on my Thinkpad now. Still haven't got it to work on the mac.
Something really strange is going on. It was working fine and then I opened the mapview project and was looking at the code. When I opened my project again it was broken, even though I hadn't changed the configuration. Also, my run configuration and working directory keep switching to an .svg file in my project even though I keep setting them to the main directory and main.py file. Now it's showing the correct preview but also giving the line 0 error.
I'm sorry about going on and on but really I'm getting so many flaky things happening it is very confusing. Qt Creator has also crashed on me many times while selecting kits. It just disappears. For awhile it was working but not finding QtLocation any more.
I hope you can make a suggestion as to why this is so flaky for me. I really need to get started on the project I'm working on but I have been spinning my wheels selecting kits and reinstalling for days. Now I have removed and reinstalled again and the installer doesn't have 7.0.2 any more, it has 8.0.0.
-
After all the issues I had above, Qt Creator just seems very buggy and maybe I won't be able to use it. It was crashing and project settings were changing sporadically. I can get it to work once after a fresh install but then something gets messed up and it won't keep working. There seems to be the same problems with 8.0.0 as with 7.0.2.