QT Creator Design Mode -Requires valid QT Kit
-
I am trying to do my first steps in designing a PySide6 UI (a simple form with some widgets), and I have hit a hurdle on the very first step.
I am using QT Creator (not QT Design Studio - maybe that is my first problem ?) and I have activated the QT Design plugin so I can use the Design mode.
I created a QT Quick project for Python, and configured it to connect to the existing python project code.I have Python installed in a project specific virtual environment, and when i look at the Project mode in QT Creator i have that environment correctly cofigured :
Under the Manage Kits button it shows what i think is the correct kit selected - i even made it the default kit to be certain
The QT versions tab shows nothing having been autodetected, despite pySide6 having been installed into the venv.
When I start the Editor I get this pop-up :
The QML code is this :
import QtQuick import QtQuick.Window Window { width: 640 height: 480 visible: true title: qsTr("Hello World") }
So how do i get rid of that pop-up and start my design journey ?
-
I am trying to do my first steps in designing a PySide6 UI (a simple form with some widgets), and I have hit a hurdle on the very first step.
I am using QT Creator (not QT Design Studio - maybe that is my first problem ?) and I have activated the QT Design plugin so I can use the Design mode.
I created a QT Quick project for Python, and configured it to connect to the existing python project code.I have Python installed in a project specific virtual environment, and when i look at the Project mode in QT Creator i have that environment correctly cofigured :
Under the Manage Kits button it shows what i think is the correct kit selected - i even made it the default kit to be certain
The QT versions tab shows nothing having been autodetected, despite pySide6 having been installed into the venv.
When I start the Editor I get this pop-up :
The QML code is this :
import QtQuick import QtQuick.Window Window { width: 640 height: 480 visible: true title: qsTr("Hello World") }
So how do i get rid of that pop-up and start my design journey ?
@TonySuffolk
Not my area, but what is on the Qt Versions tab?I am trying to do my first steps in designing a PySide6 UI (a simple form with some widgets)
Just to check with you. You have chosen to create a Qt Quick/QML project. That is not "widgets". Before you go any further, are you wanting to use Qt widgets or Qt Quick/QML, they are quite different?
-
@TonySuffolk
Not my area, but what is on the Qt Versions tab?I am trying to do my first steps in designing a PySide6 UI (a simple form with some widgets)
Just to check with you. You have chosen to create a Qt Quick/QML project. That is not "widgets". Before you go any further, are you wanting to use Qt widgets or Qt Quick/QML, they are quite different?
@JonB To be honest despite 30 years in development I found the documentation to be quite confusing in terms of the differences between QT Quick vs QT Widgets.
What I eventually worked out (and I might be wrong) is that QT Widgets is for building a complex widget which can then be included into another project etd, and that QT Quick is a simple way to implement a basic application (with menus buttons etc).
Based on my design so far I don't think my project needs to use custom widgets, so I think QT/Quick is the right thing for me.
I also did originally look at doing a QT Widget but could find no way to add Menus and status bars, which confirmed my basic understanding.
As I say though the documentation wasn't exactly clear to me, so i might have something very wrong.
The QT Versions tab shows :
-
@JonB To be honest despite 30 years in development I found the documentation to be quite confusing in terms of the differences between QT Quick vs QT Widgets.
What I eventually worked out (and I might be wrong) is that QT Widgets is for building a complex widget which can then be included into another project etd, and that QT Quick is a simple way to implement a basic application (with menus buttons etc).
Based on my design so far I don't think my project needs to use custom widgets, so I think QT/Quick is the right thing for me.
I also did originally look at doing a QT Widget but could find no way to add Menus and status bars, which confirmed my basic understanding.
As I say though the documentation wasn't exactly clear to me, so i might have something very wrong.
The QT Versions tab shows :
@TonySuffolk said in QT Creator Design Mode -Requires valid QT Kit:
What I eventually worked out (and I might be wrong) is that QT Widgets is for building a complex widget which can then be included into another project etd, and that QT Quick is a simple way to implement a basic application (with menus buttons etc).
I don't consider that a fair explanation. Widgets is "traditional" programming and traditional look & feel. It definitely involves writing C++/Python code. Qt Quick/QML is quite different, it is a declarative approach. In theory you produce a declaration of what objects you want and how they interact, then you leave it to it and don't write much code. Personally I have never understood how people write and manage a decent sized application using it. It is intended to be simpler, and it has a modern, "swishy" look & feel. Either may be what you are looking for.
I don't use Qt Quick/QML, you will have to await someone who does over your kit situation.
-
Even using the QT widgets system - i can see no way to add Menus or status bars to the form - or create designs for multiple forms in the same project.
All I want to do is build a form which I can then connect to existing Python code - but the Manuals don't even start to give a clue on how to build anything useful in Python (either using ui files or anything else).
The fact that I got the difference between QT Widgets and QT/Quick so badly wrong is maybe testament to how poor the documentation is - it seems to have been written by those who already understand what they mean and all of the terminology, and think that the tool set is entirely intuitive.
So is there a guide on how to build a real world application in QT Creator - where the buttons, editors and menus do something real ?
-
Even using the QT widgets system - i can see no way to add Menus or status bars to the form - or create designs for multiple forms in the same project.
All I want to do is build a form which I can then connect to existing Python code - but the Manuals don't even start to give a clue on how to build anything useful in Python (either using ui files or anything else).
The fact that I got the difference between QT Widgets and QT/Quick so badly wrong is maybe testament to how poor the documentation is - it seems to have been written by those who already understand what they mean and all of the terminology, and think that the tool set is entirely intuitive.
So is there a guide on how to build a real world application in QT Creator - where the buttons, editors and menus do something real ?
@TonySuffolk said in QT Creator Design Mode -Requires valid QT Kit:
add Menus or status bars to the form
Only a QMainWindow has a menu and a status bar.
or create designs for multiple forms in the same project.
You have to use one ui file per dialog/form.
-
I built a main window (or thought I had - no ability to add a menu bar or status bar.
I am more than happy to have multiple UI files - that isn't the problem - the problem is that the Designer is impenetrable and the help doesn't. -
Even using the QT widgets system - i can see no way to add Menus or status bars to the form - or create designs for multiple forms in the same project.
All I want to do is build a form which I can then connect to existing Python code - but the Manuals don't even start to give a clue on how to build anything useful in Python (either using ui files or anything else).
The fact that I got the difference between QT Widgets and QT/Quick so badly wrong is maybe testament to how poor the documentation is - it seems to have been written by those who already understand what they mean and all of the terminology, and think that the tool set is entirely intuitive.
So is there a guide on how to build a real world application in QT Creator - where the buttons, editors and menus do something real ?
@TonySuffolk
Both as @Christian-Ehrlicher wrote. Only aQMainWindow
offers these out-of-the-box, which seems reasonable to me as only a main window needs them. You can also add menus or status bars or whatever yourself if you want them elsewhere.There are loads of basic Qt widgets tutorials around. What about the ones in the Qt documentation? What about starting from Creating Main Windows in Qt Designer, which does menus for a start? Another example with doubtless use status bar.
-
I built a main window (or thought I had - no ability to add a menu bar or status bar.
I am more than happy to have multiple UI files - that isn't the problem - the problem is that the Designer is impenetrable and the help doesn't.@TonySuffolk said in QT Creator Design Mode -Requires valid QT Kit:
I built a main window (or thought I had - no ability to add a menu bar or status bar.
There is, but not sure what you call a main window. When you started designing that page/widget, did you pick
QMainWindow
as the base class? -
I don't recall it giving me a list of options - but maybe i assumed that the tool would build a 'main window' as default in a new project.
To be honest the whole thing has been incredibly frustrating.