What does moc_mainwindow.cpp do?
-
Hi,
The moc files are generated from your headers containing QObject derived classes. What exact error are you getting ?
-
Can you please show the code. Without it's pretty much impossible to tell what's going wrong.
-
I solved the problem by recreating every GUI from scratch again on QTcreator 5.3.1
There is 2 problems:
- Firstly I used QTcreator(opensource) to create projectGUI. When i used QTcreator 5.3.1 to open projectGUI, make amendment to the GUI. I run it the GUI is always the one last created by QTcreator(opensource).
- I understand that creating a GUI, added a slot by going 'go to slot', i need to remove the GUI at the same time the slot in header file.
-
This thing is bugging me continuously, ThreadMaster
1>I created a label ObjectName Picture in mainwindow.ui
2>I check mainwindow.ui updated this variable <good>
3>I go into my cpp file ui-> , intellisense never appear ObjectName Picture
<<<Why>>>
4.when i compile, issues is Class UI::MainWindows has no member named label call Picture -
Before going further you should first have a look at the "designer quick start":http://qt-project.org/doc/qt-5/designer-quick-start.html guide and related examples.
The object name property is not the same thing as the name you give to your widget.
moc_mainwindow.cpp doesn't have that ability, the moc files contains the logic to make e.g. signals and slots working for your widget.