Closed manateelazycat closed 5 years ago
For some technical reasons, the pyqt binding cannot be built as a standalone project. It should be built as part of qtermwidget. Specifically, use -DQTERMWIDGET_BUILD_PYTHON_BINDING=ON
to build qtermwidget.
@yan12125 Thanks for tips.
I have install successful with -DQTERMWIDGET_BUILD_PYTHON_BINDING=ON , but i still can't import QTermWidget after installed successful.
My install command is:
mkdir bulid && cd build
cmake .. -DQTERMWIDGET_BUILD_PYTHON_BINDING=ON
make
sudo make install
Below is install log:
cmake .. -DQTERMWIDGET_BUILD_PYTHON_BINDING=ON
-- Keyboard layouts will be installed in: /usr/local/share/qtermwidget5/kb-layouts
-- Color schemes will be installed in: /usr/local/share/qtermwidget5/color-schemes
-- Translations will be installed in: /usr/local/share/qtermwidget5/translations
-- Looking for updwtmpx
-- Looking for updwtmpx - found
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Found PythonInterp: /usr/bin/python (found version "3.7.4")
-- Found PythonLibs: /usr/lib/libpython3.7m.so (found version "3.7.4")
-- Python system site-packages directory: /usr/lib/python3.7/site-packages
-- The Python files will be installed to /usr/local/lib/python3.7/site-packages. Make sure to add them to the Python search path (e.g. by setting PYTHONPATH)
-- Found PythonLibrary: /usr/lib/libpython3.7m.so
-- Found SIP version: 4.19.19
-- Found PyQt5 version: 5.13.1
-- Configuring done
-- Generating done
-- Build files have been written to: /home/andy/qtermwidget/build
[andy@freedom build]$ make
[ 1%] Generating qtermwidget_zh_TW.qm
Updating '/home/andy/qtermwidget/build/qtermwidget_zh_TW.qm'...
Generated 21 translation(s) (21 finished and 0 unfinished)
[ 2%] Generating lib/moc_Emulation.cpp
[ 3%] Generating lib/moc_Filter.cpp
[ 4%] Generating lib/moc_HistorySearch.cpp
[ 6%] Generating lib/moc_kprocess.cpp
[ 7%] Generating lib/moc_kptydevice.cpp
[ 8%] Generating lib/moc_kptyprocess.cpp
[ 9%] Generating lib/moc_Pty.cpp
[ 11%] Generating lib/moc_qtermwidget.cpp
[ 12%] Generating lib/moc_ScreenWindow.cpp
[ 13%] Generating lib/moc_SearchBar.cpp
[ 14%] Generating lib/moc_Session.cpp
[ 16%] Generating lib/moc_TerminalDisplay.cpp
[ 17%] Generating lib/moc_Vt102Emulation.cpp
[ 18%] Generating ui_SearchBar.h
[ 19%] Generating qtermwidget_ca.qm
Updating '/home/andy/qtermwidget/build/qtermwidget_ca.qm'...
Generated 21 translation(s) (21 finished and 0 unfinished)
[ 20%] Generating qtermwidget_cs.qm
Updating '/home/andy/qtermwidget/build/qtermwidget_cs.qm'...
Generated 21 translation(s) (21 finished and 0 unfinished)
[ 22%] Generating qtermwidget_cy.qm
Updating '/home/andy/qtermwidget/build/qtermwidget_cy.qm'...
Generated 21 translation(s) (21 finished and 0 unfinished)
[ 23%] Generating qtermwidget_da.qm
Updating '/home/andy/qtermwidget/build/qtermwidget_da.qm'...
Generated 21 translation(s) (21 finished and 0 unfinished)
[ 24%] Generating qtermwidget_de.qm
Updating '/home/andy/qtermwidget/build/qtermwidget_de.qm'...
Generated 21 translation(s) (21 finished and 0 unfinished)
[ 25%] Generating qtermwidget_el.qm
Updating '/home/andy/qtermwidget/build/qtermwidget_el.qm'...
Generated 21 translation(s) (21 finished and 0 unfinished)
[ 27%] Generating qtermwidget_es.qm
Updating '/home/andy/qtermwidget/build/qtermwidget_es.qm'...
Generated 21 translation(s) (21 finished and 0 unfinished)
[ 28%] Generating qtermwidget_fr.qm
Updating '/home/andy/qtermwidget/build/qtermwidget_fr.qm'...
Generated 21 translation(s) (21 finished and 0 unfinished)
[ 29%] Generating qtermwidget_gl.qm
Updating '/home/andy/qtermwidget/build/qtermwidget_gl.qm'...
Generated 21 translation(s) (21 finished and 0 unfinished)
[ 30%] Generating qtermwidget_he.qm
Updating '/home/andy/qtermwidget/build/qtermwidget_he.qm'...
Generated 21 translation(s) (21 finished and 0 unfinished)
[ 32%] Generating qtermwidget_hu.qm
Updating '/home/andy/qtermwidget/build/qtermwidget_hu.qm'...
Generated 21 translation(s) (21 finished and 0 unfinished)
[ 33%] Generating qtermwidget_ja.qm
Updating '/home/andy/qtermwidget/build/qtermwidget_ja.qm'...
Generated 21 translation(s) (21 finished and 0 unfinished)
[ 34%] Generating qtermwidget_lt.qm
Updating '/home/andy/qtermwidget/build/qtermwidget_lt.qm'...
Generated 21 translation(s) (21 finished and 0 unfinished)
[ 35%] Generating qtermwidget_nb_NO.qm
Updating '/home/andy/qtermwidget/build/qtermwidget_nb_NO.qm'...
Generated 21 translation(s) (21 finished and 0 unfinished)
[ 37%] Generating qtermwidget_pl.qm
Updating '/home/andy/qtermwidget/build/qtermwidget_pl.qm'...
Generated 21 translation(s) (21 finished and 0 unfinished)
[ 38%] Generating qtermwidget_pt.qm
Updating '/home/andy/qtermwidget/build/qtermwidget_pt.qm'...
Generated 21 translation(s) (21 finished and 0 unfinished)
[ 39%] Generating qtermwidget_pt_BR.qm
Updating '/home/andy/qtermwidget/build/qtermwidget_pt_BR.qm'...
Generated 21 translation(s) (21 finished and 0 unfinished)
[ 40%] Generating qtermwidget_tr.qm
Updating '/home/andy/qtermwidget/build/qtermwidget_tr.qm'...
Generated 21 translation(s) (21 finished and 0 unfinished)
[ 41%] Generating qtermwidget_zh_CN.qm
Updating '/home/andy/qtermwidget/build/qtermwidget_zh_CN.qm'...
Generated 21 translation(s) (21 finished and 0 unfinished)
Scanning dependencies of target qtermwidget5
[ 43%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/BlockArray.cpp.o
[ 44%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/ColorScheme.cpp.o
/home/andy/qtermwidget/lib/ColorScheme.cpp: 在成员函数‘Konsole::ColorEntry Konsole::ColorScheme::colorEntry(int, uint) const’中:
/home/andy/qtermwidget/lib/ColorScheme.cpp:185:42: 警告:implicitly-declared ‘Konsole::ColorEntry::ColorEntry(const Konsole::ColorEntry&)’ is deprecated [-Wdeprecated-copy]
185 | ColorEntry entry = colorTable()[index];
| ^
In file included from /home/andy/qtermwidget/lib/ColorScheme.h:34,
from /home/andy/qtermwidget/lib/ColorScheme.cpp:23:
/home/andy/qtermwidget/lib/CharacterColor.h:84:8: 附注:because ‘Konsole::ColorEntry’ has user-provided ‘void Konsole::ColorEntry::operator=(const Konsole::ColorEntry&)’
84 | void operator=(const ColorEntry& rhs)
| ^~~~~~~~
/home/andy/qtermwidget/lib/ColorScheme.cpp:207:12: 警告:implicitly-declared ‘Konsole::ColorEntry::ColorEntry(const Konsole::ColorEntry&)’ is deprecated [-Wdeprecated-copy]
207 | return entry;
| ^~~~~
In file included from /home/andy/qtermwidget/lib/ColorScheme.h:34,
from /home/andy/qtermwidget/lib/ColorScheme.cpp:23:
/home/andy/qtermwidget/lib/CharacterColor.h:84:8: 附注:because ‘Konsole::ColorEntry’ has user-provided ‘void Konsole::ColorEntry::operator=(const Konsole::ColorEntry&)’
84 | void operator=(const ColorEntry& rhs)
| ^~~~~~~~
[ 45%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/Emulation.cpp.o
[ 46%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/Filter.cpp.o
[ 48%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/History.cpp.o
/home/andy/qtermwidget/lib/History.cpp: 在成员函数‘virtual void Konsole::HistoryScrollBuffer::addCells(const Konsole::Character*, int)’中:
/home/andy/qtermwidget/lib/History.cpp:316:34: 警告:‘OutputIterator qCopy(InputIterator, InputIterator, OutputIterator) [with InputIterator = const Konsole::Character*; OutputIterator = Konsole::Character*]’ is deprecated: Use std::copy [-Wdeprecated-declarations]
316 | qCopy(a,a+count,newLine.begin());
| ^
In file included from /usr/include/qt/QtCore/qlist.h:43,
from /usr/include/qt/QtCore/qhash.h:46,
from /usr/include/qt/QtCore/QHash:1,
from /home/andy/qtermwidget/lib/History.h:26,
from /home/andy/qtermwidget/lib/History.cpp:22:
/usr/include/qt/QtCore/qalgorithms.h:82:56: 附注:在此声明
82 | QT_DEPRECATED_X("Use std::copy") inline OutputIterator qCopy(InputIterator begin, InputIterator end, OutputIterator dest)
| ^~~~~
/home/andy/qtermwidget/lib/History.cpp:316:34: 警告:‘OutputIterator qCopy(InputIterator, InputIterator, OutputIterator) [with InputIterator = const Konsole::Character*; OutputIterator = Konsole::Character*]’ is deprecated: Use std::copy [-Wdeprecated-declarations]
316 | qCopy(a,a+count,newLine.begin());
| ^
In file included from /usr/include/qt/QtCore/qlist.h:43,
from /usr/include/qt/QtCore/qhash.h:46,
from /usr/include/qt/QtCore/QHash:1,
from /home/andy/qtermwidget/lib/History.h:26,
from /home/andy/qtermwidget/lib/History.cpp:22:
/usr/include/qt/QtCore/qalgorithms.h:82:56: 附注:在此声明
82 | QT_DEPRECATED_X("Use std::copy") inline OutputIterator qCopy(InputIterator begin, InputIterator end, OutputIterator dest)
| ^~~~~
/home/andy/qtermwidget/lib/History.cpp: 在成员函数‘virtual void Konsole::CompactHistoryScroll::addCells(const Konsole::Character*, int)’中:
/home/andy/qtermwidget/lib/History.cpp:732:37: 警告:‘OutputIterator qCopy(InputIterator, InputIterator, OutputIterator) [with InputIterator = const Konsole::Character*; OutputIterator = Konsole::Character*]’ is deprecated: Use std::copy [-Wdeprecated-declarations]
732 | qCopy ( a,a+count,newLine.begin() );
| ^
In file included from /usr/include/qt/QtCore/qlist.h:43,
from /usr/include/qt/QtCore/qhash.h:46,
from /usr/include/qt/QtCore/QHash:1,
from /home/andy/qtermwidget/lib/History.h:26,
from /home/andy/qtermwidget/lib/History.cpp:22:
/usr/include/qt/QtCore/qalgorithms.h:82:56: 附注:在此声明
82 | QT_DEPRECATED_X("Use std::copy") inline OutputIterator qCopy(InputIterator begin, InputIterator end, OutputIterator dest)
| ^~~~~
/home/andy/qtermwidget/lib/History.cpp:732:37: 警告:‘OutputIterator qCopy(InputIterator, InputIterator, OutputIterator) [with InputIterator = const Konsole::Character*; OutputIterator = Konsole::Character*]’ is deprecated: Use std::copy [-Wdeprecated-declarations]
732 | qCopy ( a,a+count,newLine.begin() );
| ^
In file included from /usr/include/qt/QtCore/qlist.h:43,
from /usr/include/qt/QtCore/qhash.h:46,
from /usr/include/qt/QtCore/QHash:1,
from /home/andy/qtermwidget/lib/History.h:26,
from /home/andy/qtermwidget/lib/History.cpp:22:
/usr/include/qt/QtCore/qalgorithms.h:82:56: 附注:在此声明
82 | QT_DEPRECATED_X("Use std::copy") inline OutputIterator qCopy(InputIterator begin, InputIterator end, OutputIterator dest)
| ^~~~~
[ 49%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/HistorySearch.cpp.o
[ 50%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/KeyboardTranslator.cpp.o
[ 51%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/konsole_wcwidth.cpp.o
[ 53%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/kprocess.cpp.o
[ 54%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/kpty.cpp.o
[ 55%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/kptydevice.cpp.o
[ 56%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/kptyprocess.cpp.o
[ 58%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/Pty.cpp.o
[ 59%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/qtermwidget.cpp.o
[ 60%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/Screen.cpp.o
[ 61%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/ScreenWindow.cpp.o
[ 62%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/SearchBar.cpp.o
[ 64%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/Session.cpp.o
[ 65%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/ShellCommand.cpp.o
[ 66%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/TerminalCharacterDecoder.cpp.o
[ 67%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/TerminalDisplay.cpp.o
/home/andy/qtermwidget/lib/TerminalDisplay.cpp: 在成员函数‘virtual void Konsole::TerminalDisplay::fontChange(const QFont&)’中:
/home/andy/qtermwidget/lib/TerminalDisplay.cpp:225:62: 警告:‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations]
225 | _fontWidth = qRound((double)fm.width(QLatin1String(REPCHAR))/(double)qstrlen(REPCHAR));
| ^
In file included from /usr/include/qt/QtWidgets/qwidget.h:50,
from /usr/include/qt/QtWidgets/QWidget:1,
from /home/andy/qtermwidget/lib/TerminalDisplay.h:27,
from /home/andy/qtermwidget/lib/TerminalDisplay.cpp:24:
/usr/include/qt/QtGui/qfontmetrics.h:108:9: 附注:在此声明
108 | int width(const QString &, int len = -1) const;
| ^~~~~
/home/andy/qtermwidget/lib/TerminalDisplay.cpp:229:44: 警告:‘int QFontMetrics::width(QChar) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations]
229 | int fw = fm.width(QLatin1Char(REPCHAR[0]));
| ^
In file included from /usr/include/qt/QtWidgets/qwidget.h:50,
from /usr/include/qt/QtWidgets/QWidget:1,
from /home/andy/qtermwidget/lib/TerminalDisplay.h:27,
from /home/andy/qtermwidget/lib/TerminalDisplay.cpp:24:
/usr/include/qt/QtGui/qfontmetrics.h:112:9: 附注:在此声明
112 | int width(QChar) const;
| ^~~~~
/home/andy/qtermwidget/lib/TerminalDisplay.cpp:232:47: 警告:‘int QFontMetrics::width(QChar) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations]
232 | if (fw != fm.width(QLatin1Char(REPCHAR[i])))
| ^
In file included from /usr/include/qt/QtWidgets/qwidget.h:50,
from /usr/include/qt/QtWidgets/QWidget:1,
from /home/andy/qtermwidget/lib/TerminalDisplay.h:27,
from /home/andy/qtermwidget/lib/TerminalDisplay.cpp:24:
/usr/include/qt/QtGui/qfontmetrics.h:112:9: 附注:在此声明
112 | int width(QChar) const;
| ^~~~~
/home/andy/qtermwidget/lib/TerminalDisplay.cpp: 在成员函数‘void Konsole::TerminalDisplay::drawTextFragment(QPainter&, const QRect&, const wstring&, const Konsole::Character*)’中:
/home/andy/qtermwidget/lib/TerminalDisplay.cpp:881:50: 警告:‘const QBrush& QPalette::background() const’ is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations]
881 | if ( backgroundColor != palette().background().color() )
| ^
In file included from /usr/include/qt/QtWidgets/qwidget.h:48,
from /usr/include/qt/QtWidgets/QWidget:1,
from /home/andy/qtermwidget/lib/TerminalDisplay.h:27,
from /home/andy/qtermwidget/lib/TerminalDisplay.cpp:24:
/usr/include/qt/QtGui/qpalette.h:151:26: 附注:在此声明
151 | inline const QBrush &background() const { return window(); }
| ^~~~~~~~~~
/home/andy/qtermwidget/lib/TerminalDisplay.cpp: 在成员函数‘void Konsole::TerminalDisplay::showResizeNotification()’中:
/home/andy/qtermwidget/lib/TerminalDisplay.cpp:1284:80: 警告:‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations]
1284 | _resizeWidget->setMinimumWidth(_resizeWidget->fontMetrics().width(label));
| ^
In file included from /usr/include/qt/QtWidgets/qwidget.h:50,
from /usr/include/qt/QtWidgets/QWidget:1,
from /home/andy/qtermwidget/lib/TerminalDisplay.h:27,
from /home/andy/qtermwidget/lib/TerminalDisplay.cpp:24:
/usr/include/qt/QtGui/qfontmetrics.h:108:9: 附注:在此声明
108 | int width(const QString &, int len = -1) const;
| ^~~~~
/home/andy/qtermwidget/lib/TerminalDisplay.cpp: 在成员函数‘virtual void Konsole::TerminalDisplay::paintEvent(QPaintEvent*)’中:
/home/andy/qtermwidget/lib/TerminalDisplay.cpp:1378:60: 警告:‘QVector<QRect> QRegion::rects() const’ is deprecated: Use begin()/end() instead [-Wdeprecated-declarations]
1378 | const auto rects = (pe->region() & contentsRect()).rects();
| ^
In file included from /usr/include/qt/QtGui/qmatrix.h:45,
from /usr/include/qt/QtGui/qbrush.h:49,
from /usr/include/qt/QtGui/qpalette.h:46,
from /usr/include/qt/QtWidgets/qwidget.h:48,
from /usr/include/qt/QtWidgets/QWidget:1,
from /home/andy/qtermwidget/lib/TerminalDisplay.h:27,
from /home/andy/qtermwidget/lib/TerminalDisplay.cpp:24:
/usr/include/qt/QtGui/qregion.h:127:20: 附注:在此声明
127 | QVector<QRect> rects() const;
| ^~~~~
/home/andy/qtermwidget/lib/TerminalDisplay.cpp:1381:52: 警告:‘const QBrush& QPalette::background() const’ is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations]
1381 | drawBackground(paint,rect,palette().background().color(),
| ^
In file included from /usr/include/qt/QtWidgets/qwidget.h:48,
from /usr/include/qt/QtWidgets/QWidget:1,
from /home/andy/qtermwidget/lib/TerminalDisplay.h:27,
from /home/andy/qtermwidget/lib/TerminalDisplay.cpp:24:
/usr/include/qt/QtGui/qpalette.h:151:26: 附注:在此声明
151 | inline const QBrush &background() const { return window(); }
| ^~~~~~~~~~
/home/andy/qtermwidget/lib/TerminalDisplay.cpp: 在成员函数‘int Konsole::TerminalDisplay::textWidth(int, int, int) const’中:
/home/andy/qtermwidget/lib/TerminalDisplay.cpp:1555:73: 警告:‘int QFontMetrics::width(QChar) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations]
1555 | result += fm.width(_image[loc(startColumn + column, line)].character);
| ^
In file included from /usr/include/qt/QtWidgets/qwidget.h:50,
from /usr/include/qt/QtWidgets/QWidget:1,
from /home/andy/qtermwidget/lib/TerminalDisplay.h:27,
from /home/andy/qtermwidget/lib/TerminalDisplay.cpp:24:
/usr/include/qt/QtGui/qfontmetrics.h:112:9: 附注:在此声明
112 | int width(QChar) const;
| ^~~~~
/home/andy/qtermwidget/lib/TerminalDisplay.cpp: 在成员函数‘void Konsole::TerminalDisplay::swapColorTable()’中:
/home/andy/qtermwidget/lib/TerminalDisplay.cpp:2984:35: 警告:implicitly-declared ‘Konsole::ColorEntry::ColorEntry(const Konsole::ColorEntry&)’ is deprecated [-Wdeprecated-copy]
2984 | ColorEntry color = _colorTable[1];
| ^
In file included from /home/andy/qtermwidget/lib/Character.h:30,
from /home/andy/qtermwidget/lib/TerminalDisplay.h:31,
from /home/andy/qtermwidget/lib/TerminalDisplay.cpp:24:
/home/andy/qtermwidget/lib/CharacterColor.h:84:8: 附注:because ‘Konsole::ColorEntry’ has user-provided ‘void Konsole::ColorEntry::operator=(const Konsole::ColorEntry&)’
84 | void operator=(const ColorEntry& rhs)
| ^~~~~~~~
/home/andy/qtermwidget/lib/TerminalDisplay.cpp: 在成员函数‘void Konsole::TerminalDisplay::doDrag()’中:
/home/andy/qtermwidget/lib/TerminalDisplay.cpp:3166:44: 警告:‘Qt::DropAction QDrag::start(Qt::DropActions)’ is deprecated: Use QDrag::exec() instead [-Wdeprecated-declarations]
3166 | dragInfo.dragObject->start(Qt::CopyAction);
| ^
In file included from /usr/include/qt/QtGui/QDrag:1,
from /home/andy/qtermwidget/lib/TerminalDisplay.cpp:45:
/usr/include/qt/QtGui/qdrag.h:79:20: 附注:在此声明
79 | Qt::DropAction start(Qt::DropActions supportedActions = Qt::CopyAction);
| ^~~~~
[ 69%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/tools.cpp.o
[ 70%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/Vt102Emulation.cpp.o
/home/andy/qtermwidget/lib/Vt102Emulation.cpp: 在成员函数‘void Konsole::Vt102Emulation::reportCursorPosition()’中:
/home/andy/qtermwidget/lib/Vt102Emulation.cpp:874:24: 警告:‘%d’ directive writing between 1 and 11 bytes into a region of size between 6 and 16 [-Wformat-overflow=]
874 | sprintf(tmp,"\033[%d;%dR",_currentScreen->getCursorY()+1,_currentScreen->getCursorX()+1);
| ^~
/home/andy/qtermwidget/lib/Vt102Emulation.cpp:874:15: 附注:directive argument in the range [-2147483647, 2147483647]
874 | sprintf(tmp,"\033[%d;%dR",_currentScreen->getCursorY()+1,_currentScreen->getCursorX()+1);
| ^~~~~~~~~~~~~
/home/andy/qtermwidget/lib/Vt102Emulation.cpp:874:10: 附注:‘sprintf’ output between 7 and 27 bytes into a destination of size 20
874 | sprintf(tmp,"\033[%d;%dR",_currentScreen->getCursorY()+1,_currentScreen->getCursorX()+1);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/andy/qtermwidget/lib/Vt102Emulation.cpp: 在成员函数‘virtual void Konsole::Vt102Emulation::sendMouseEvent(int, int, int, int)’中:
/home/andy/qtermwidget/lib/Vt102Emulation.cpp:957:56: 警告:‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size between 7 and 26 [-Wformat-truncation=]
957 | snprintf(command, sizeof(command), "\033[%d;%d;%dM", cb + 0x20, cx, cy);
| ^~
/home/andy/qtermwidget/lib/Vt102Emulation.cpp:957:44: 附注:directive argument in the range [1, 2147483647]
957 | snprintf(command, sizeof(command), "\033[%d;%d;%dM", cb + 0x20, cx, cy);
| ^~~~~~~~~~~~~~~~
/home/andy/qtermwidget/lib/Vt102Emulation.cpp:957:17: 附注:‘snprintf’ output between 9 and 37 bytes into a destination of size 32
957 | snprintf(command, sizeof(command), "\033[%d;%d;%dM", cb + 0x20, cx, cy);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/andy/qtermwidget/lib/Vt102Emulation.cpp: 在成员函数‘void Konsole::Vt102Emulation::processToken(int, wchar_t, int)’中:
/home/andy/qtermwidget/lib/Vt102Emulation.cpp:874:24: 警告:‘%d’ directive writing between 1 and 11 bytes into a region of size between 6 and 16 [-Wformat-overflow=]
874 | sprintf(tmp,"\033[%d;%dR",_currentScreen->getCursorY()+1,_currentScreen->getCursorX()+1);
| ^~
/home/andy/qtermwidget/lib/Vt102Emulation.cpp:874:15: 附注:directive argument in the range [-2147483647, 2147483647]
874 | sprintf(tmp,"\033[%d;%dR",_currentScreen->getCursorY()+1,_currentScreen->getCursorX()+1);
| ^~~~~~~~~~~~~
/home/andy/qtermwidget/lib/Vt102Emulation.cpp:874:10: 附注:‘sprintf’ output between 7 and 27 bytes into a destination of size 20
874 | sprintf(tmp,"\033[%d;%dR",_currentScreen->getCursorY()+1,_currentScreen->getCursorX()+1);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 71%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/moc_Emulation.cpp.o
[ 72%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/moc_Filter.cpp.o
[ 74%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/moc_HistorySearch.cpp.o
[ 75%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/moc_kprocess.cpp.o
[ 76%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/moc_kptydevice.cpp.o
[ 77%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/moc_kptyprocess.cpp.o
[ 79%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/moc_Pty.cpp.o
[ 80%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/moc_qtermwidget.cpp.o
[ 81%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/moc_ScreenWindow.cpp.o
[ 82%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/moc_SearchBar.cpp.o
[ 83%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/moc_Session.cpp.o
[ 85%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/moc_TerminalDisplay.cpp.o
[ 86%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/moc_Vt102Emulation.cpp.o
[ 87%] Linking CXX shared library libqtermwidget5.so
[ 87%] Built target qtermwidget5
Scanning dependencies of target __home_andy_qtermwidget_build_pyqt____pycache_____init__.cpython-37.pyc
Byte-compiling /home/andy/qtermwidget/build/pyqt//__init__.py to /home/andy/qtermwidget/build/pyqt//__pycache__/__init__.cpython-37.pyc
[ 87%] Built target __home_andy_qtermwidget_build_pyqt____pycache_____init__.cpython-37.pyc
[ 88%] Generating sip/sipQTermWidgetpart0.cpp, sip/sipQTermWidgetpart1.cpp, sip/sipQTermWidgetpart2.cpp, sip/sipQTermWidgetpart3.cpp, sip/sipQTermWidgetpart4.cpp, sip/sipQTermWidgetpart5.cpp, sip/sipQTermWidgetpart6.cpp, sip/sipQTermWidgetpart7.cpp
Scanning dependencies of target python_module_QTermWidget
[ 90%] Building CXX object pyqt/CMakeFiles/python_module_QTermWidget.dir/sip/sipQTermWidgetpart0.cpp.o
[ 91%] Building CXX object pyqt/CMakeFiles/python_module_QTermWidget.dir/sip/sipQTermWidgetpart1.cpp.o
[ 92%] Building CXX object pyqt/CMakeFiles/python_module_QTermWidget.dir/sip/sipQTermWidgetpart2.cpp.o
[ 93%] Building CXX object pyqt/CMakeFiles/python_module_QTermWidget.dir/sip/sipQTermWidgetpart3.cpp.o
[ 95%] Building CXX object pyqt/CMakeFiles/python_module_QTermWidget.dir/sip/sipQTermWidgetpart4.cpp.o
[ 96%] Building CXX object pyqt/CMakeFiles/python_module_QTermWidget.dir/sip/sipQTermWidgetpart5.cpp.o
[ 97%] Building CXX object pyqt/CMakeFiles/python_module_QTermWidget.dir/sip/sipQTermWidgetpart6.cpp.o
[ 98%] Building CXX object pyqt/CMakeFiles/python_module_QTermWidget.dir/sip/sipQTermWidgetpart7.cpp.o
[100%] Linking CXX shared library QTermWidget.so
[100%] Built target python_module_QTermWidget
[andy@freedom build]$ sudo make install
[ 87%] Built target qtermwidget5
Byte-compiling /home/andy/qtermwidget/build/pyqt//__init__.py to /home/andy/qtermwidget/build/pyqt//__pycache__/__init__.cpython-37.pyc
[ 87%] Built target __home_andy_qtermwidget_build_pyqt____pycache_____init__.cpython-37.pyc
[100%] Built target python_module_QTermWidget
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/share/qtermwidget5/translations/qtermwidget_ca.qm
-- Installing: /usr/local/share/qtermwidget5/translations/qtermwidget_cs.qm
-- Installing: /usr/local/share/qtermwidget5/translations/qtermwidget_cy.qm
-- Installing: /usr/local/share/qtermwidget5/translations/qtermwidget_da.qm
-- Installing: /usr/local/share/qtermwidget5/translations/qtermwidget_de.qm
-- Installing: /usr/local/share/qtermwidget5/translations/qtermwidget_el.qm
-- Installing: /usr/local/share/qtermwidget5/translations/qtermwidget_es.qm
-- Installing: /usr/local/share/qtermwidget5/translations/qtermwidget_fr.qm
-- Installing: /usr/local/share/qtermwidget5/translations/qtermwidget_gl.qm
-- Installing: /usr/local/share/qtermwidget5/translations/qtermwidget_he.qm
-- Installing: /usr/local/share/qtermwidget5/translations/qtermwidget_hu.qm
-- Installing: /usr/local/share/qtermwidget5/translations/qtermwidget_ja.qm
-- Installing: /usr/local/share/qtermwidget5/translations/qtermwidget_lt.qm
-- Installing: /usr/local/share/qtermwidget5/translations/qtermwidget_nb_NO.qm
-- Installing: /usr/local/share/qtermwidget5/translations/qtermwidget_pl.qm
-- Installing: /usr/local/share/qtermwidget5/translations/qtermwidget_pt.qm
-- Installing: /usr/local/share/qtermwidget5/translations/qtermwidget_pt_BR.qm
-- Installing: /usr/local/share/qtermwidget5/translations/qtermwidget_tr.qm
-- Installing: /usr/local/share/qtermwidget5/translations/qtermwidget_zh_CN.qm
-- Installing: /usr/local/share/qtermwidget5/translations/qtermwidget_zh_TW.qm
-- Installing: /usr/local/lib/cmake/qtermwidget5/qtermwidget5-config-version.cmake
-- Installing: /usr/local/lib/cmake/qtermwidget5/qtermwidget5-targets.cmake
-- Installing: /usr/local/lib/cmake/qtermwidget5/qtermwidget5-targets-release.cmake
-- Installing: /usr/local/include/qtermwidget5/qtermwidget.h
-- Installing: /usr/local/include/qtermwidget5/Emulation.h
-- Installing: /usr/local/include/qtermwidget5/Filter.h
-- Installing: /usr/local/include/qtermwidget5/qtermwidget_export.h
-- Installing: /usr/local/share/qtermwidget5/kb-layouts
-- Installing: /usr/local/share/qtermwidget5/kb-layouts/vt420pc.keytab
-- Installing: /usr/local/share/qtermwidget5/kb-layouts/default.keytab
-- Installing: /usr/local/share/qtermwidget5/kb-layouts/linux.keytab
-- Installing: /usr/local/share/qtermwidget5/kb-layouts/solaris.keytab
-- Installing: /usr/local/share/qtermwidget5/kb-layouts/historic
-- Installing: /usr/local/share/qtermwidget5/kb-layouts/historic/vt100.keytab
-- Installing: /usr/local/share/qtermwidget5/kb-layouts/historic/x11r5.keytab
-- Installing: /usr/local/share/qtermwidget5/kb-layouts/macbook.keytab
-- Installing: /usr/local/share/qtermwidget5/color-schemes
-- Installing: /usr/local/share/qtermwidget5/color-schemes/WhiteOnBlack.schema
-- Installing: /usr/local/share/qtermwidget5/color-schemes/Tango.colorscheme
-- Installing: /usr/local/share/qtermwidget5/color-schemes/Linux.colorscheme
-- Installing: /usr/local/share/qtermwidget5/color-schemes/BlackOnRandomLight.colorscheme
-- Installing: /usr/local/share/qtermwidget5/color-schemes/DarkPastels.colorscheme
-- Installing: /usr/local/share/qtermwidget5/color-schemes/GreenOnBlack.colorscheme
-- Installing: /usr/local/share/qtermwidget5/color-schemes/SolarizedLight.colorscheme
-- Installing: /usr/local/share/qtermwidget5/color-schemes/Ubuntu.colorscheme
-- Installing: /usr/local/share/qtermwidget5/color-schemes/historic
-- Installing: /usr/local/share/qtermwidget5/color-schemes/historic/Transparent_lightbg.schema
-- Installing: /usr/local/share/qtermwidget5/color-schemes/historic/BlackOnLightColor.schema
-- Installing: /usr/local/share/qtermwidget5/color-schemes/historic/Linux.schema
-- Installing: /usr/local/share/qtermwidget5/color-schemes/historic/GreenTint_MC.schema
-- Installing: /usr/local/share/qtermwidget5/color-schemes/historic/GreenOnBlack.schema
-- Installing: /usr/local/share/qtermwidget5/color-schemes/historic/vim.schema
-- Installing: /usr/local/share/qtermwidget5/color-schemes/historic/Transparent_MC.schema
-- Installing: /usr/local/share/qtermwidget5/color-schemes/historic/syscolor.schema
-- Installing: /usr/local/share/qtermwidget5/color-schemes/historic/Transparent.schema
-- Installing: /usr/local/share/qtermwidget5/color-schemes/historic/XTerm.schema
-- Installing: /usr/local/share/qtermwidget5/color-schemes/historic/GreenTint.schema
-- Installing: /usr/local/share/qtermwidget5/color-schemes/historic/LightPicture.schema
-- Installing: /usr/local/share/qtermwidget5/color-schemes/historic/Transparent_darkbg.schema
-- Installing: /usr/local/share/qtermwidget5/color-schemes/historic/DarkPicture.schema
-- Installing: /usr/local/share/qtermwidget5/color-schemes/Solarized.colorscheme
-- Installing: /usr/local/share/qtermwidget5/color-schemes/BlackOnLightYellow.schema
-- Installing: /usr/local/share/qtermwidget5/color-schemes/BlackOnWhite.schema
-- Installing: /usr/local/share/qtermwidget5/color-schemes/BreezeModified.colorscheme
-- Installing: /usr/local/lib/pkgconfig/qtermwidget5.pc
-- Installing: /usr/local/lib/cmake/qtermwidget5/qtermwidget5-config.cmake
-- Installing: /usr/local/lib/libqtermwidget5.so.0.14.1
-- Installing: /usr/local/lib/libqtermwidget5.so.0
-- Installing: /usr/local/lib/libqtermwidget5.so
-- Installing: /usr/local/lib/python3.7/site-packages/QTermWidget.so
-- Set runtime path of "/usr/local/lib/python3.7/site-packages/QTermWidget.so" to ""
-- Installing: /usr/local/lib/python3.7/site-packages/PyQt5/qtermwidget/__init__.py
-- Installing: /usr/local/lib/python3.7/site-packages/PyQt5/qtermwidget/__pycache__/__init__.cpython-37.pyc
-- Installing: /usr/local/share/sip/PyQt5/qtermwidget
-- Installing: /usr/local/share/sip/PyQt5/qtermwidget/qtermwidget.sip
Thanks for help!
Well, you need to install the python binding under /usr/lib/python3.7 as Python does not look into /usr/local. I guess the AUR package https://aur.archlinux.org/packages/qtermwidget-git can provide all you need.
Well, you need to install the python binding under /usr/lib/python3.7 as Python does not look into /usr/local. I guess the AUR package https://aur.archlinux.org/packages/qtermwidget-git can provide all you need.
aur package fix my problem, thank you so much @yan12125 !
I have install qtermwidget from archlinux repo.
When i do:
I got error when i
make
:I have check, /usr/include/qt/QtCore/QMetaType is install in system.
Maybe something wrong in CMakeLists.txt that need include path of QMetaType ?
Thanks for help!