zonyitoo / doubanfm-qt

A DoubanFM client
Other
511 stars 99 forks source link

QtGui/QAction:没有那个文件或目录 #9

Closed pazz7ven closed 11 years ago

pazz7ven commented 11 years ago

In file included from channelwidget.cpp:2:0: ui_channelwidget.h:14:25: 致命错误: QtGui/QAction:没有那个文件或目录 编译中断。 make: *\ [channelwidget.o] 错误 1

ubuntu 13.04

zonyitoo commented 11 years ago

请使用Qt5的qmake

pazz7ven commented 11 years ago

creep@shell:~$ qmake Usage: /usr/lib/x86_64-linux-gnu/qt5/bin/qmake [mode] [options] [files]

就是qt5啊

zonyitoo commented 11 years ago

Qt4的QAction才在QtGui下,Qt5的QAction是在QtWidgets下的。

我看了一下我的ui_channelwidget.h,里面的确是

#ifndef UI_CHANNELWIDGET_H
#define UI_CHANNELWIDGET_H

#include <QtCore/QVariant>
#include <QtWidgets/QAction>  // 没有 QtGui/QAction
#include <QtWidgets/QApplication>
#include <QtWidgets/QButtonGroup>
#include <QtWidgets/QHeaderView>
#include <QtWidgets/QLabel>
#include <QtWidgets/QToolButton>
#include <QtWidgets/QWidget>
#include "horizontalslider.h"

QT_BEGIN_NAMESPACE

class Ui_ChannelWidget
{
public:
...

可以考虑把Makefile删掉再用qmake处理一次

pazz7ven commented 11 years ago

整个删掉 重新clone 终于能用了

zonyitoo commented 11 years ago

Enjoy it,有Bug再联系