LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1470|回复: 11

[求助]debian下进行QT编程要安装什么包?

[复制链接]
发表于 2006-11-28 11:53:01 | 显示全部楼层 |阅读模式
大家帮个忙啊!
apt-cache search qt,出来好多!但是不知道装哪个,我装了libqt3-dev,在/usr/lib里面有libqt.so的文件了,写了test.cpp文件,用g++ -lqt test.cpp -o test。还是提示找不到include里面的qt头文件。
发表于 2006-11-28 12:21:44 | 显示全部楼层
我用pyqt4,好像就装这个包就行了。其它的依赖自行安装
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-11-28 12:45:12 | 显示全部楼层
我怎么只有这个
xiaodolphin:/home/xiaodolphin/test# apt-cache search pyqt
eric - full featured Python IDE
luma - gui utility for accessing and managing LDAP database
memaid-pyqt - memorization tool with optimal question scheduling
pyqt-tools - pyuic and pylupdate for Qt3
python-qt-dev - Qt bindings for Python - Development files
python-qt3 - Qt3 bindings for Python (default version)
python-qt3-doc - Qt bindings for Python - Documentation and examples
python-qt3-gl - Qt3 OpenGL bindings for Python (default version)
python-qtext - Qt extensions for PyQt (default version)
python2.3-qt3 - Qt3 bindings for Python 2.3
python2.3-qt3-gl - Qt3 OpenGL bindings for Python 2.3
python2.3-qtext - Qt extensions for PyQt
pyuic3 - pyuic for Qt3 - dummy package
qtorrent - BitTorrent client for QT 3.x
那装哪个?
回复 支持 反对

使用道具 举报

发表于 2006-11-28 13:27:31 | 显示全部楼层
haha@rainFlower:~$ apt-cache search pyqt
eric - full featured Python IDE
eric-api-files - API description files for use with eric
luma - gui utility for accessing and managing LDAP database
memaid-pyqt - memorization tool with optimal question scheduling
pyqt-tools - pyuic and pylupdate for Qt3
pyqt4-dev-tools - Development tools for PyQt4
python-kde3-dev - KDE3 bindings for Python - Development files and scripts
python-qt-dev - Qt bindings for Python - Development files
python-qt3 - Qt3 bindings for Python
python-qt3-doc - Qt bindings for Python - Documentation and examples
python-qt3-gl - Qt3 OpenGL bindings for Python
python-qt4 - Python bindings for Qt4
python-qt4-dev - Development files for PyQt4
python-qt4-doc - Documentation and examples for PyQt4
python-qt4-gl - Python bindings for Qt4's OpenGL module
python-qt4-sql - Python bindings for Qt4's SQL module
python-qtext - Qt extensions for PyQt
qtorrent - graphical BitTorrent client using Qt 3.x
treeline - versatile tree-like structured custom data manager

I'm using Debian Sid
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-11-28 13:31:17 | 显示全部楼层
有人说装qt3-designer,你试过吗?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-11-28 14:44:13 | 显示全部楼层
装这么多了还不行
dpkg -l|grep qt3
ii  libqt3-headers 3.3.4-3sarge1  Qt3 header files
ii  libqt3-mt-dev  3.3.4-3sarge1  Qt development files (Threaded)
ii  libqt3c102     3.3.4-3sarge1  Qt GUI Library, Version 3
ii  libqt3c102-mt  3.3.4-3sarge1  Qt GUI Library (Threaded runtime version), V
ii  qt3-apps-dev   3.3.4-3sarge1  Qt3 Developer applications development files
ii  qt3-assistant  3.3.4-3sarge1  The Qt3 assistant application
ii  qt3-designer   3.3.4-3sarge1  Qt3 Designer
ii  qt3-dev-tools  3.3.4-3sarge1  Qt3 development tools
ii  qt3-dev-tools- 3.3.4-3sarge1  Tools to develop embedded Qt applications
ii  qt3-doc        3.3.4-3sarge1  Qt3 API documentation
ii  qt3-examples   3.3.4-3sarge1  Examples for Qt3
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-11-28 14:45:03 | 显示全部楼层
xiaodolphin:/home/xiaodolphin/test# g++ -lqt test.cpp -o test
test.cpp:1:26: qapplication.h: No such file or directory
test.cpp:2:20: qwidget.h: No such file or directory
test.cpp:3:24: qpushbutton.h: No such file or directory
test.cpp: In function `int main(int, char**)':
test.cpp:6: error: `QApplication' undeclared (first use this function)
test.cpp:6: error: (Each undeclared identifier is reported only once for each
   function it appears in.)
test.cpp:6: error: parse error before `(' token
test.cpp:7: error: `QWidget' undeclared (first use this function)
test.cpp:8: error: `mainwindow' undeclared (first use this function)
test.cpp:10: error: `QPushButton' undeclared (first use this function)
test.cpp:10: error: parse error before `(' token
test.cpp:11: error: `helloworld' undeclared (first use this function)
test.cpp:12: error: `a' undeclared (first use this function)
test.cpp:13: error: `show' undeclared (first use this function
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-11-28 14:45:44 | 显示全部楼层
test.cpp

#include <qapplication.h>
#include<qwidget.h>
#include<qpushbutton.h>
int main(int argc,char **argv)
{
  QApplication a(argc,argv);
  QWidget mainwindow;
  mainwindow.setMinimumSize(200,100);
  mainwindow.setMaximumSize(200,100);
  QPushButton helloworld("hello world!",&mainwindow);
  helloworld.setGeometry(20,20,160,60);
  a.setMainWidget(&mainwindow);
  mainwindow,show();
  return a.exec();
}
回复 支持 反对

使用道具 举报

发表于 2006-11-28 15:39:55 | 显示全部楼层
装那个看你需要,python-qt3/4是主要的,
如果从源代码安装,需要
qt-x11
sip
和pyqt
回复 支持 反对

使用道具 举报

发表于 2006-11-28 16:02:04 | 显示全部楼层
ls /usr/include/qt3/

try #include <qt3/qapplication.h>
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表