I suggest to use https://github.com/MITK/MITK-ProjectTemplate as a template for 
your own project repo. It comes with templates for modules, plugins, and 
applications. See its Readme file for a kick-start.

Best,
Stefan



Am 07.08.2020 15:01 schrieb p...@zjut.edu.cn:
Hi Stefan,

Thank you for your quick reply.
The suggestion (5) fixed my problem. It seems that I have to delete the cache.

A further question is how could I create such an executable project 
conveniently using the mitk plugin generator or the template?

Also, thanks for the suggestion on the Qt version. I'll change it to the LTS 
version.

Best,
Qing

Dr. Qing PAN
Associate Professor
College of Information Engineering
Zhejiang University of Technology
288 Liuhe Road, 310023 Hangzhou China
Phone: +86-85290595
Email: p...@zjut.edu.cn

From: Dinkelacker, Stefan <s.dinkelac...@dkfz-heidelberg.de>
Sent: Friday, August 7, 2020 4:37 PM
To: p...@zjut.edu.cn; mitk-users@lists.sourceforge.net
Subject: RE: [mitk-users] Support Qt MetaObject in MITK project

Hi,


  1.  Add your header file to MOC_H_FILES in files.cmake (double-check, 
case-sensitivity, path, everything correct?)
  2.  Derive from a QWidget or a subclass of it
  3.  Make sure that the Qt base class that you derive from is the FIRST base 
class you write in your declaration like "class TestWidget : public QWidget, 
OtherBaseClass"
  4.  Add Q_OBJECT to the class declaration
  5.  Rerun CMake Generate before building your app

Best,
Stefan

PS: We recommend to work with Qt 5.12.x LTS.

From: p...@zjut.edu.cn<mailto:p...@zjut.edu.cn> [mailto:p...@zjut.edu.cn]
Sent: Friday, August 7, 2020 9:44 AM
To: mitk-users@lists.sourceforge.net<mailto:mitk-users@lists.sourceforge.net>
Subject: [mitk-users] Support Qt MetaObject in MITK project

Hi all,

I'm new to MITK and want to develop an application using MITK as a toolkit and 
Qt as the GUI.
It seems that the Step 6 in the tutorial fits my requirement best. The moc 
system processes Step6.h file with a Q_OBJECT successfully and generates a 
moc_Step6.cpp file. But when I add my own widgets (TestWidget.cpp and 
TestWidget.h, with Q_OBJECT in TestWidget.h), I can't get the 
moc_TestWidget.cpp. I notice that the files.cmake in 
MITK\Examples\Tutorial\Step6 folder includes the moc file list. So I add my own 
file to the list but still cannot get what I want.

Can anyone give me a hint?
Thanks!

Environment:
Win 10 64bit
MITK 2018.04
Qt 5.14.2
Visual Studio 2017

Dr. Qing PAN
Associate Professor
College of Information Engineering
Zhejiang University of Technology
288 Liuhe Road, 310023 Hangzhou China
Phone: +86-85290595
Email: p...@zjut.edu.cn<mailto:p...@zjut.edu.cn>

_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to