From 1638609997cfef8fa1c63ba3f6ba93b9f6a4b014 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Wed, 28 Sep 2016 13:27:40 +0200 Subject: Properly import python_tqt module in scripts generated by pyuic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- doc/PyQt.html | 2 +- doc/PyQt.sgml | 2 +- doc/qtdocs.sip | 2 +- examples3/SQL/connect.ui.h | 2 +- pyuic2/uic.cpp | 2 +- pyuic3/embed.cpp | 2 +- pyuic3/form.cpp | 8 ++++---- pyuic3/main.cpp | 2 +- sip/qtxml/qtxmlmod.sip | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/PyQt.html b/doc/PyQt.html index 44721e0..c004474 100644 --- a/doc/PyQt.html +++ b/doc/PyQt.html @@ -291,7 +291,7 @@ WIDTH="100%" >
from qt import *
+>from python_tqt.qt import *
 
 # Import our custom widget.
 from foo import bar
pyuic. -from qt import * +from python_tqt.qt import * # Import our custom widget. from foo import bar diff --git a/doc/qtdocs.sip b/doc/qtdocs.sip index c057544..14dde83 100644 --- a/doc/qtdocs.sip +++ b/doc/qtdocs.sip @@ -285,7 +285,7 @@ Here's the corresponding output from pyuic. -from qt import * +from python_tqt.qt import * # Import our custom widget. from foo import bar diff --git a/examples3/SQL/connect.ui.h b/examples3/SQL/connect.ui.h index 9d994ff..ceff8dc 100644 --- a/examples3/SQL/connect.ui.h +++ b/examples3/SQL/connect.ui.h @@ -9,7 +9,7 @@ void ConnectDialog::init() { -from qtsql import TQSqlDatabase +from python_tqt.qtsql import TQSqlDatabase #qDebug("ConnectDialog init") self.comboDriver.clear() self.comboDriver.insertStringList(TQSqlDatabase.drivers()) diff --git a/pyuic2/uic.cpp b/pyuic2/uic.cpp index 7014d17..58db033 100644 --- a/pyuic2/uic.cpp +++ b/pyuic2/uic.cpp @@ -1581,7 +1581,7 @@ int main( int argc, char * argv[] ) if (execCode) out << "import sys" << endl; - out << "from qt import *" << endl; + out << "from python_tqt.qt import *" << endl; Uic( out, doc, trmacro.isEmpty() ? TQString("self.tr") : trmacro ); diff --git a/pyuic3/embed.cpp b/pyuic3/embed.cpp index 410a0d8..bba5f7f 100644 --- a/pyuic3/embed.cpp +++ b/pyuic3/embed.cpp @@ -135,7 +135,7 @@ void Uic::embed( TQTextStream& out, const char* project, const TQStringList& ima out << "\n"; out << "\n"; - out << "from qt import TQImage, TQMimeSourceFactory"; + out << "from python_tqt.qt import TQImage, TQMimeSourceFactory"; #ifndef QT_NO_IMAGE_COLLECTION_COMPRESSION out << ", tqUncompress"; #endif diff --git a/pyuic3/form.cpp b/pyuic3/form.cpp index 1e5a81e..3ef0c04 100644 --- a/pyuic3/form.cpp +++ b/pyuic3/form.cpp @@ -258,13 +258,13 @@ void Uic::createFormImpl( const TQDomElement &e ) } if (globalIncludes.findIndex("qtable.h") >= 0) - out << indent << "from qttable import TQTable" << endl; + out << indent << "from python_tqt.qttable import TQTable" << endl; if (!axwidgets.empty()) - out << indent << "from qtaxcontainer import TQAxWidget" << endl; + out << indent << "from python_tqt.qtaxcontainer import TQAxWidget" << endl; if (globalIncludes.findIndex("qextscintilla.h") >= 0) - out << indent << "from qtext import QextScintilla" << endl; + out << indent << "from python_tqt.qtext import QextScintilla" << endl; registerDatabases( e ); dbConnections = unique( dbConnections ); @@ -302,7 +302,7 @@ void Uic::createFormImpl( const TQDomElement &e ) sqlClasses += "TQDataView"; if ( !sqlClasses.empty() ) { - out << indent << "from qtsql import"; + out << indent << "from python_tqt.qtsql import"; const char *sep = " "; for ( it = sqlClasses.begin(); it != sqlClasses.end(); ++it ) { diff --git a/pyuic3/main.cpp b/pyuic3/main.cpp index b1c1fdb..42d1c63 100644 --- a/pyuic3/main.cpp +++ b/pyuic3/main.cpp @@ -220,7 +220,7 @@ int main( int argc, char * argv[] ) if (testCode || execCode) out << "import sys" << endl; - out << "from qt import *" << endl; + out << "from python_tqt.qt import *" << endl; Uic( fileName, outputFile, out, doc, subcl, trmacro, className, uicClass ); diff --git a/sip/qtxml/qtxmlmod.sip b/sip/qtxml/qtxmlmod.sip index 4e058d8..11c38c4 100644 --- a/sip/qtxml/qtxmlmod.sip +++ b/sip/qtxml/qtxmlmod.sip @@ -36,7 +36,7 @@ // qt module which sorts it out, but this module doesn't so we add a dummy. It // is ignored by SIP v4.x and later. %PrePythonCode -from qt import TQObject +from python_tqt.qt import TQObject %End -- cgit v1.2.1