Auto-generate setters/getters with Qt Creator
Do a right click on your member then Refactor then Generate Getter and Setter member function and you’re done 🙂 On Qt Creator 3.2.x, create the member, then click on it and press alt+Enter :
Do a right click on your member then Refactor then Generate Getter and Setter member function and you’re done 🙂 On Qt Creator 3.2.x, create the member, then click on it and press alt+Enter :
Unfortunately it’s only a workaround (but I will write more as soon as possible) but this post pointed me to just disable “Load system GDB pretty printers” in Tools->Options->Debugger->GDB This behavior is a filed bug in QtCreator 3.0 seems to work for me now! EDIT: Although the bug tracker for QtCreator 3.0 says the bug … Read more
As Greenflow mentioned, Qt Creator can import existing project but it doesn’t even depend on the existence of the Makefile. All you need to do for import of the existing project is specify the high-level folder in which the sources of the project are located (including sources in subdirectories) and set some name for the … Read more
Viewing project as a file system is not a solution at all cause your project editor settings for example would not apply. And I do not like to add headers to executable target, cause they do not actually belong there. You effectively cripple the project file to work nicely with one particular IDE… not good. … Read more
Do a right click on your member then Refactor then Generate Getter and Setter member function and you’re done 🙂 On Qt Creator 3.2.x, create the member, then click on it and press alt+Enter :
As per the solution you linked to, the way to accomplish testing two (or more) classes within a single Qt unit test project is to ensure that each class to be tested has a corresponding test class, and that you’ve created a custom int main that executes each test class. For example: class TestClassA : … Read more
In the designer, add Push Button to the form right click the Push Button select “Go to slot…” select “clicked()” signal done The terms are different from .NET, so in this case we are talking about signals and slots, and the signal emitted when QPushButton is clicked is called clicked() instead of OnClick. Reading the … Read more
QString allows you to work with Unicode, has more useful methods and integrates with Qt well. It also has better performance, as cbamber85 noted. std::string just stores the bytes as you give them to it, it doesn’t know anything about encodings. It uses one byte per character, but it’s not enough for all the languages … Read more
You can’t. The visible property seems to be voluntarily removed from the property editor of Qt Designer and you can’t add it back. You can add the property manually to the .ui file by adding the following XML block inside the node for the widget you want to hide: <property name=”visible”> <bool>false</bool> </property> But the … Read more
There are two methods: void QTableWidget::setCellWidget(int row, int column, QWidget* widget) and void QListWidget::setItemWidget(QListWidgetItem* item, QWidget* widget) They allow to insert any widget and other controls that inherit QWidget. Checkbox/radio button/combobox do inherit from QWidget.