简体   繁体   中英

Where do i get more widgets for qtcreator?

In qtcreator, when i highlight the qml file, i can select the design tab. How do i add more qt widgets to it?

I've installed qml-module-qtquick-controls from the repos and any qml-module-* named packages that i can, but in the qml types of qtcreator, no extra qml types appear in the pane. I was looking for widgets like buttons, etc but nothing seems to work

What should i install from the repo to get buttons that i can drag and drop into the form editor? I base this on having seen pictures of others having a paneful of widgets. On the other hand when i click on a *.ui file, the design tab reveals a different editor with all kinds of widgets. What is the difference between a *.qml file and a *.ui file?

first question: "getting more controls in QML file" when you are in Design mode you have three tabs on top: QML Types, Resources and Imports. The last one is what you need. Click on the button with "Add Import" and a list with all possible qml imports is shown. fi. choosing QtQuick.Controls 2.13 will add buttons, check boxes, radio buttons and others...which you will see now on tab "QML Types"

second question:"What is the difference between a *.qml file and a *.ui file?"

qml files are meant to be used in Qt Quick applications and ui. files for Widget based applications. You will find the basic introduction to them in the Qt Creator manual topic "Designing User Interfaces"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM