Browse Source

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)
tags/r14.0.4^0
Slávek Banko 3 years ago
parent
commit
929e8d56cb
9 changed files with 12 additions and 12 deletions
  1. +1
    -1
      doc/PyQt.html
  2. +1
    -1
      doc/PyQt.sgml
  3. +1
    -1
      doc/qtdocs.sip
  4. +1
    -1
      examples3/SQL/connect.ui.h
  5. +1
    -1
      pyuic2/uic.cpp
  6. +1
    -1
      pyuic3/embed.cpp
  7. +4
    -4
      pyuic3/form.cpp
  8. +1
    -1
      pyuic3/main.cpp
  9. +1
    -1
      sip/qtxml/qtxmlmod.sip

+ 1
- 1
doc/PyQt.html View File

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

+ 1
- 1
doc/PyQt.sgml View File

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

+ 1
- 1
doc/qtdocs.sip View File

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

+ 1
- 1
examples3/SQL/connect.ui.h View File

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

+ 1
- 1
pyuic2/uic.cpp View File

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


+ 1
- 1
pyuic3/embed.cpp View File

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

+ 4
- 4
pyuic3/form.cpp View File

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

+ 1
- 1
pyuic3/main.cpp View File

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


+ 1
- 1
sip/qtxml/qtxmlmod.sip View File

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



Loading…
Cancel
Save