Removed QtDesigner dependency from QtUiTools module.

Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
          Luciano Wolf <luciano.wolf@openbossa.org>
This commit is contained in:
renatofilho 2010-10-15 18:18:27 -03:00
commit e7f280f745
4 changed files with 3 additions and 63 deletions

View file

@ -183,7 +183,7 @@ set(GENERATOR_EXTRA_FLAGS --generatorSet=shiboken --enable-parent-ctor-heuristic
enable_testing() enable_testing()
add_subdirectory(libpyside) add_subdirectory(libpyside)
if(QT_QTDESIGNER_FOUND) if(QT_QTUITOOLS_FOUND)
add_subdirectory(plugins) add_subdirectory(plugins)
endif() endif()
# project directories # project directories

View file

@ -19,7 +19,7 @@ add_library(uiplugin STATIC ${ui_plugin_src} ${MOC_FILES})
add_definitions(-fPIC) add_definitions(-fPIC)
add_definitions(-DQT_STATICPLUGIN) add_definitions(-DQT_STATICPLUGIN)
target_link_libraries(uiplugin target_link_libraries(uiplugin
${QT_QTDESIGNER_LIBRARY} ${QT_QTUITOOLS_LIBRARY}
${SHIBOKEN_LIBRARY} ${SHIBOKEN_LIBRARY}
${PYTHON_LIBRARY}) ${PYTHON_LIBRARY})
if (CMAKE_BUILD_TYPE STREQUAL "Debug") if (CMAKE_BUILD_TYPE STREQUAL "Debug")

View file

@ -2,7 +2,7 @@ import unittest
import os import os
from helper import UsesQApplication from helper import UsesQApplication
from PySide import QtGui, QtDeclarative from PySide import QtGui
from PySide.QtUiTools import QUiLoader from PySide.QtUiTools import QUiLoader
class MyWidget(QtGui.QComboBox): class MyWidget(QtGui.QComboBox):
@ -21,15 +21,6 @@ class BugTest(UsesQApplication):
result = loader.load(filePath, w) result = loader.load(filePath, w)
self.assert_(isinstance(result.statusbar.actionFoo, QtGui.QAction)) self.assert_(isinstance(result.statusbar.actionFoo, QtGui.QAction))
def testCustomWidgets(self):
w = QtGui.QWidget()
loader = QUiLoader()
filePath = os.path.join(os.path.dirname(__file__), 'customwidget.ui')
result = loader.load(filePath, w)
self.assert_(isinstance(result.declarativeView, QtDeclarative.QDeclarativeView))
self.assert_(isinstance(result.worldTimeClock, QtGui.QWidget))
def testPythonCustomWidgets(self): def testPythonCustomWidgets(self):
w = QtGui.QWidget() w = QtGui.QWidget()
loader = QUiLoader() loader = QUiLoader()

View file

@ -1,51 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>qwidget</class>
<widget class="QWidget" name="qwidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>303</width>
<height>350</height>
</rect>
</property>
<property name="windowTitle">
<string/>
</property>
<widget class="QDeclarativeView" name="declarativeView">
<property name="geometry">
<rect>
<x>0</x>
<y>150</y>
<width>300</width>
<height>200</height>
</rect>
</property>
</widget>
<widget class="WorldTimeClock" name="worldTimeClock">
<property name="geometry">
<rect>
<x>190</x>
<y>20</y>
<width>100</width>
<height>100</height>
</rect>
</property>
</widget>
</widget>
<customwidgets>
<customwidget>
<class>QDeclarativeView</class>
<extends>QGraphicsView</extends>
<header>QtDeclarative/QDeclarativeView</header>
</customwidget>
<customwidget>
<class>WorldTimeClock</class>
<extends>QWidget</extends>
<header>worldtimeclock.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>