Properly import python_tqt module in scripts generated by pyuic

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 1638609997)
r14.0.x r14.0.8
Slávek Banko 8 лет назад
Родитель f303e4dc2b
Сommit 929e8d56cb

@ -291,7 +291,7 @@ WIDTH="100%"
><TD
><PRE
CLASS="PROGRAMLISTING"
>from qt import *
>from python_tqt.qt import *
# Import our custom widget.
from foo import bar</PRE

@ -256,7 +256,7 @@ Here's the corresponding output from <Literal>pyuic</Literal>.
</Para>
<ProgramListing>
from qt import *
from python_tqt.qt import *
# Import our custom widget.
from foo import bar

@ -285,7 +285,7 @@ Here's the corresponding output from <Literal>pyuic</Literal>.
</Para>
<ProgramListing>
from qt import *
from python_tqt.qt import *
# Import our custom widget.
from foo import bar

@ -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())

@ -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 );

@ -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

@ -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 ) {

@ -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 );

@ -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

Загрузка…
Отмена
Сохранить