Results 1 to 8 of 8

Thread: Compilation of QT Property Browser

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2010
    Location
    Sydney, Australia
    Posts
    111
    Thanks
    18
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Compilation of QT Property Browser

    I managed to get QtPropertyBrowser building, but I had to manually edit the "Generated Files" section of the vcproj file that was created by the Qt VS plugin to remove a bogus "Debug" filter and add a build directive for "qteditfactory.moc".

    I added the following to buildlib.vcproj:

    Qt Code:
    1. <File
    2. RelativePath="debug\qteditorfactory.moc"
    3. >
    4. <FileConfiguration
    5. Name="Debug|Win32"
    6. >
    7. <Tool
    8. Name="VCCustomBuildTool"
    9. Description="MOC ..\src\qteditorfactory.cpp"
    10. CommandLine="Rem IncrediBuild_AllowRemote&#x0D;&#x0A;Rem IncrediBuild_OutputFile debugqteditorfactory.moc&#x0D;&#x0A;&quot;$(QTDIR)\bin\moc.exe&quot; -D_WINDOWS -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_QTPROPERTYBROWSER_EXPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -D_WINDLL -I&quot;$(QTDIR)\include\QtCore\.&quot; -I&quot;$(QTDIR)\include\QtGui\.&quot; -I&quot;$(QTDIR)\include\.&quot; -I&quot;.\..\src\.&quot; -I&quot;$(QTDIR)\include\ActiveQt\.&quot; -I&quot;.\debug\.&quot; -I&quot;$(QTDIR)\mkspecs\win32-msvc2008\.&quot; &quot;..\src\qteditorfactory.cpp&quot; -o &quot;debug\qteditorfactory.moc&quot;&#x0D;&#x0A;"
    11. AdditionalDependencies="..\src\qteditorfactory.cpp;Rem"
    12. Outputs="debug\qteditorfactory.moc"
    13. />
    14. </FileConfiguration>
    15. <FileConfiguration
    16. Name="Release|Win32"
    17. >
    18. <Tool
    19. Name="VCCustomBuildTool"
    20. Description="MOC ..\src\qteditorfactory.cpp"
    21. CommandLine="Rem IncrediBuild_AllowRemote&#x0D;&#x0A;Rem IncrediBuild_OutputFile releaseqteditorfactory.moc&#x0D;&#x0A;&quot;$(QTDIR)\bin\moc.exe&quot; -DQT_NO_DEBUG -DNDEBUG -D_WINDOWS -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_QTPROPERTYBROWSER_IMPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DNDEBUG -D_WINDLL -I&quot;$(QTDIR)\include\QtCore\.&quot; -I&quot;$(QTDIR)\include\QtGui\.&quot; -I&quot;$(QTDIR)\include\.&quot; -I&quot;.\..\src\.&quot; -I&quot;$(QTDIR)\include\ActiveQt\.&quot; -I&quot;.\release\.&quot; -I&quot;$(QTDIR)\mkspecs\win32-msvc2008\.&quot; &quot;..\src\qteditorfactory.cpp&quot; -o &quot;release\qteditorfactory.moc&quot;&#x0D;&#x0A;"
    22. AdditionalDependencies="..\src\qteditorfactory.cpp;Rem"
    23. Outputs="release\qteditorfactory.moc"
    24. />
    25. </FileConfiguration>
    26. </File>
    To copy to clipboard, switch view to plain text mode 

    I am now able to get a debug and release build of QtPropertyBrowser 2.5.1 using Qt 4.6.2 on Window 7. I believe that the problem here is a bug with the Qt VS plugin. Anyone care to comment on that?

  2. #2
    Join Date
    Feb 2010
    Location
    Sydney, Australia
    Posts
    111
    Thanks
    18
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Compilation of QT Property Browser

    I use static versions of this QtPropertyBrowser library because I get linker errors when attempting to use DLL's - something about staticMetaObject.

    These are the steps that I follow on Windows 7, Visual Studio 2008, Qt 4.6.3:

    1. Unpack the Files from the archive (qtpropertybrowser-2.5_1-opensource.zip)
    2. Change to the qtpropertybrowser-2.5_1-opensource directory
    3. Run the configure script (configure.bat): configure -library
    4. Run qmake: $(QTDIR)\bin.qmake.exe
    5. Manually run moc.exe on:
      1. qteditorfactory.h
      2. qtpropertymanager.h
      3. qttreebrowser.h
    6. Copy moc files to intermediate directories (Debug, Release)
    7. Open qtpropertybrowser.pro with Visual Studio Qt plugin
    8. Change the Configuration Type for both Debug and Release to Static Library (.lib)
    9. Change the Output Directory and the Intermediate Directory to $(ConfigurationName)
    10. For Release and Debug modes, change QT_QTPROPERTYBROWSER_IMPORT to QT_QTPROPERTYBROWSER_EXPORT for C++ >> Preprocessor >> Preprocessor Definitions
    11. Remove Post-Build Event which will attempt to copy a .dll to $(QTDIR)\bin
    12. Build Debug and Release libraries


    Once the libraries have been built they will be located at ...\qtpropertybrowser-2.5_1-opensource\buildlib\[Debug\Release]. Other libraries that link against them should refer to them there.

    With this set of steps I don't get any of the compiler or linker errors mentioned above.
    Last edited by stefanadelbert; 29th July 2010 at 04:09.

Similar Threads

  1. Replies: 2
    Last Post: 1st April 2009, 23:52
  2. Realisation of Property Editor (Browser) in Qt Jambi
    By Pavka in forum Qt Programming
    Replies: 0
    Last Post: 30th January 2009, 07:11
  3. Replies: 7
    Last Post: 14th March 2008, 13:52
  4. Invoking a browser...???
    By deepusrp in forum Newbie
    Replies: 4
    Last Post: 12th June 2007, 17:32
  5. Adding property editor file browser popup...
    By thawkins in forum Qt Tools
    Replies: 1
    Last Post: 25th April 2007, 23:03

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.