跳到內容
  • 版面
  • 最新
  • 標籤
  • 熱門
  • 使用者
  • 群組
  • 搜尋
  • Get Qt Extensions
  • Unsolved
Collapse
品牌標誌
  1. 首頁
  2. International
  3. Chinese
  4. 欢迎大家来到Qt中文论坛
Forum Updated to NodeBB v4.3 + New Features

欢迎大家来到Qt中文论坛

已排程 已置頂 已鎖定 已移動 Chinese
86 貼文 65 Posters 164.2k 瀏覽 2 Watching
  • 從舊到新
  • 從新到舊
  • 最多點贊
回覆
  • 在新貼文中回覆
登入後回覆
此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
  • J 離線
    J 離線
    jiangcaiyang
    寫於 最後由 編輯
    #49

    YouTube的视频在大陆看不起。
    [quote author="jayjie" date="1374976398"]捧场,捧场来啦,弱弱的问一下,那个视频怎么看不起喃[/quote]

    1 條回覆 最後回覆
    0
    • E 離線
      E 離線
      eiao
      寫於 最後由 編輯
      #50

      新人报道~从百度贴吧过来...

      1 條回覆 最後回覆
      0
      • Z 離線
        Z 離線
        zixialang
        寫於 最後由 編輯
        #51

        I'm coming.

        1 條回覆 最後回覆
        0
        • L 離線
          L 離線
          liye0005
          寫於 最後由 編輯
          #52

          新人报道

          1 條回覆 最後回覆
          0
          • C 離線
            C 離線
            caochuanlong
            寫於 最後由 編輯
            #53

            我装的QT5.2,然后编译时提示没有compiler,请问该怎么弄呢?我时新手,呵呵

            1 條回覆 最後回覆
            0
            • J 離線
              J 離線
              jekin
              寫於 最後由 編輯
              #54

              一直不知有个中文的版块,一直用Qt遇到的问题是很多,因为英文表达比较差,所以很少提问,很多的问题都是靠自己反复阅读英文文档才搞明白,以后至少可以在这里向大家提提问。

              1 條回覆 最後回覆
              0
              • T 離線
                T 離線
                the_maskedman
                寫於 最後由 編輯
                #55

                新人来报个到.

                1 條回覆 最後回覆
                0
                • H 離線
                  H 離線
                  hou_jiangzhen
                  寫於 最後由 編輯
                  #56

                  @
                  #pragma once
                  #ifndef HICONEDITOR_H
                  #define HICONEDITOR_H
                  #include <QWidget>
                  //!@ HIConEditor 类描述
                  //!@ 类名:HIConEditor
                  //!@ 基类名:QWidget
                  //!@ 文件名称:e:\DrawLine\test\HIConEditor.h
                  //!@ 创建者:Administrator
                  //!@ 创建时间: 2014/03/29 17:26:33
                  //!@ 类描述:

                  class HIConEditor:public QWidget
                  {
                  Q_OBJECT
                  Q_PROPERTY(QImage iconImage READ GetIConImage WRITE SetIConImage)
                  Q_PROPERTY(QColor penColor READ GetPenColor WRITE SetPenColor)
                  Q_PROPERTY(int zoomFactor READ GetZoomFactor WRITE SetZoomFactor)
                  public:
                  HIConEditor(QWidget *pParent=0);

                  void SetPenColor(const QColor &newColor);
                  inline QColor GetPenColor()const{return m_curColor;}
                  void SetIConImage(const QImage &newImage);
                  inline QImage GetIConImage()const{return m_curImage;}
                  void SetZoomFactor(const int nZoom);
                  inline int GetZoomFactor()const{return m_nZoom;}

                  //!@重写基类函数
                  QSize sizeHint()const;

                  //!@ 重写基类函数
                  protected:
                  void mousePressEvent(QMouseEvent * event);
                  void mouseMoveEvent(QMouseEvent * event);
                  void paintEvent(QPaintEvent * event);

                  private:
                  void SetImagePixel(const QPoint &ptPosition,bool bOpaque);
                  QRect GetPixelRect( const int nX, const int nY);

                  private:
                  QColor m_curColor;
                  QImage m_curImage;
                  int m_nZoom;
                  };

                  #endif
                  @
                  @#include <QPainter>
                  #include <QPaintEvent>
                  #include "HIConEditor.h"
                  HIConEditor::HIConEditor( QWidget pParent/=0*/ )
                  :QWidget(pParent)
                  {
                  setAttribute(Qt::WA_StaticContents);
                  setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum);
                  m_curColor=Qt::black;
                  m_nZoom=8;
                  m_curImage=QImage(16,16,QImage::Format_ARGB32);//w,h
                  m_curImage.fill(qRgba(0,0,0,0));
                  }

                  QSize HIConEditor::sizeHint() const
                  {
                  QSize qSize=m_nZoom*m_curImage.size();
                  if (m_nZoom>=3)
                  {
                  qSize+=QSize(1,1);
                  }
                  return qSize;
                  }

                  void HIConEditor::SetPenColor( const QColor &newColor )
                  {
                  if (newColor != m_curColor)
                  {
                  m_curColor=newColor;
                  }
                  }

                  void HIConEditor::SetIConImage( const QImage &newImage )
                  {
                  if (newImage !=m_curImage)
                  {
                  m_curImage=newImage.convertToFormat(QImage::Format_ARGB32);
                  update();
                  updateGeometry();
                  }
                  }

                  void HIConEditor::SetZoomFactor( const int nZoom )
                  {
                  if (nZoom !=m_nZoom)
                  {
                  if (nZoom<1)
                  {
                  m_nZoom=nZoom;
                  update();
                  updateGeometry();
                  }
                  }
                  }

                  void HIConEditor::paintEvent( QPaintEvent * event )
                  {
                  QPainter painter(this);
                  if (m_nZoom>=3)
                  {
                  painter.setPen(palette().foreground().color());
                  for (int i=0;i<=m_curImage.width();i++)
                  {
                  painter.drawLine(m_nZoomi,0,m_nZoomi,m_nZoomm_curImage.height());
                  }
                  for(int i=0;i<=m_curImage.height();i++)
                  {
                  painter.drawLine(0,m_nZoom
                  i,m_nZoomm_curImage.width(),m_nZoomi);
                  }
                  }
                  for(int i=0;i<m_curImage.width();i++)
                  {
                  for(int j=0;j<m_curImage.height();j++)
                  {
                  QRect rect=GetPixelRect(i,j);
                  if (!event->region().intersect(rect).isEmpty())
                  {
                  QColor color=QColor::fromRgba(m_curImage.pixel(i,j));
                  if (color.alpha()<255)
                  {
                  painter.fillRect(rect,Qt::white);
                  }
                  else
                  {
                  painter.fillRect(rect,color);
                  }
                  }
                  }
                  }
                  }

                  QRect HIConEditor::GetPixelRect( const int nX, const int nY )
                  {
                  if (m_nZoom>=3)
                  {
                  return QRect(m_nZoomnX+1,m_nZoomnY+1,m_nZoom-1,m_nZoom-1);//(x,y,w,h)
                  }
                  else
                  {
                  return QRect(m_nZoomnX,m_nZoomnY,m_nZoom,m_nZoom);
                  }
                  }

                  void HIConEditor::mousePressEvent( QMouseEvent * event )
                  {
                  if (event->button()==Qt::LeftButton)
                  {
                  SetImagePixel(event->pos(),true);
                  }
                  else if (event->button()==Qt::RightButton)
                  {
                  SetImagePixel(event->pos(),false);
                  }
                  }

                  void HIConEditor::SetImagePixel( const QPoint &ptPosition,bool bOpaque )
                  {
                  int i=ptPosition.x()/m_nZoom;
                  int j=ptPosition.y()/m_nZoom;
                  if (m_curImage.rect().contains(i,j))
                  {
                  if (bOpaque)
                  {
                  m_curImage.setPixel(i,j,GetPenColor().rgba());
                  }
                  else
                  {
                  m_curImage.setPixel(i,j,qRgba(0,0,0,0));
                  }
                  update(GetPixelRect(i,j));
                  }
                  }

                  void HIConEditor::mouseMoveEvent( QMouseEvent * event )
                  {
                  if (event->buttons()&Qt::LeftButton)
                  {
                  SetImagePixel(event->pos(),true);
                  }
                  else if (event->buttons()&Qt::RightButton)
                  {
                  SetImagePixel(event->pos(),false);
                  }
                  }
                  @
                  @#pragma once
                  #ifndef HICONEDITORPLUGIN_H
                  #define HICONEDITORPLUGIN_H
                  #include <QDesignerCustomWidgetInterface>
                  class HIconEditorPlugin :public QObject,public QDesignerCustomWidgetInterface
                  {
                  Q_OBJECT
                  Q_INTERFACES(QDesignerCustomWidgetInterface) //告知qt这个类实现的是QDesignerCustomWidgetInterface接口
                  public:
                  HIconEditorPlugin(QObject*pParent=0);

                  //!@ 重写
                  QString name()const;
                  //!@ 重写
                  QString includeFile()const;
                  //!@ 重写
                  QString group()const;
                  //!@ 重写
                  QIcon icon()const;
                  //!@ 重写
                  QString toolTip()const;
                  //!@ 重写
                  QString whatsThis()const;
                  //!@ 重写
                  bool isContainer()const;
                  //!@ 重写
                  QWidget createWidget(QWidget parent);
                  };
                  #endif
                  @
                  @
                  #include "HIconEditorPlugin.h"
                  #include "HIConEditor.h"
                  #include "qplugin.h"
                  HIconEditorPlugin::HIconEditorPlugin( QObject
                  pParent/
                  =0*/ )
                  :QObject(pParent)
                  {

                  }

                  QString HIconEditorPlugin::name() const
                  {
                  return "HIConEditor";
                  }

                  QString HIconEditorPlugin::includeFile() const
                  {
                  return "HIConEditor.h";
                  }

                  QString HIconEditorPlugin::group() const
                  {
                  return tr("Image Manipulation Widgets");
                  }

                  QIcon HIconEditorPlugin::icon() const
                  {
                  return QIcon(":/images/iconeditor.png");
                  }

                  QString HIconEditorPlugin::toolTip() const
                  {
                  return tr("An icon editor widget");
                  }

                  QString HIconEditorPlugin::whatsThis() const
                  {
                  return tr("This widget is presented in Chapter 5 of <i>C++ GUI"
                  "Programming with Qt 4</i> as example of a custom Qt"
                  "widget.");
                  }

                  bool HIconEditorPlugin::isContainer() const
                  {
                  return false;
                  }

                  QWidget * HIconEditorPlugin::createWidget( QWidget *parent )
                  {
                  return new HIConEditor(parent);
                  }
                  Q_EXPORT_PLUGIN2(hiconeditorplugin,HIconEditorPlugin)@

                  为什么下面这个QImage属性在QDesigner设计器中不显示,而其他定义的属性正常显示。
                  !C:\Users\Administrator\Desktop\QQ图片20140330192657.jpg(F:\QQ图片20140330192657.jpg)!Q_PROPERTY(QImage iconImage READ GetIConImage WRITE SetIConImage)

                  1 條回覆 最後回覆
                  0
                  • Q 離線
                    Q 離線
                    qq897425998
                    寫於 最後由 編輯
                    #57

                    今天才发现 官网资源 这么丰富 以后就用官的论坛了

                    1 條回覆 最後回覆
                    0
                    • Q 離線
                      Q 離線
                      qq897425998
                      寫於 最後由 編輯
                      #58

                      今天才发现 官网资源 这么丰富 以后就用官的论坛了 就是访问这网站慢了点

                      1 條回覆 最後回覆
                      0
                      • W 離線
                        W 離線
                        William_YY
                        寫於 最後由 編輯
                        #59

                        都是2011年的回帖,没人了么。

                        1 條回覆 最後回覆
                        0
                        • C 離線
                          C 離線
                          CloudCastle
                          寫於 最後由 編輯
                          #60

                          我是武汉的,一直在玩百度贴吧
                          第一次到这边来,请多多关照~

                          a laptop and a book, a cup of coffee with one person.

                          1 條回覆 最後回覆
                          0
                          • S 離線
                            S 離線
                            smallghost
                            寫於 最後由 編輯
                            #61

                            新人报道!!!

                            1 條回覆 最後回覆
                            0
                            • D 離線
                              D 離線
                              deleted487
                              寫於 最後由 編輯
                              #62

                              测试一下

                              1 條回覆 最後回覆
                              0
                              • D 離線
                                D 離線
                                deleted487
                                寫於 最後由 編輯
                                #63

                                test from Chrome

                                1 條回覆 最後回覆
                                0
                                • J 離線
                                  J 離線
                                  jiangcaiyang
                                  寫於 最後由 編輯
                                  #64

                                  Test from Chrome V35 for Windows.

                                  1 條回覆 最後回覆
                                  0
                                  • W 離線
                                    W 離線
                                    wuhuan
                                    寫於 最後由 編輯
                                    #65

                                    安装的时候,需要用户认证,出现ssl握手失败导致无法下一步安装,要怎么解决?

                                    joeQJ 1 條回覆 最後回覆
                                    0
                                    • W wuhuan

                                      安装的时候,需要用户认证,出现ssl握手失败导致无法下一步安装,要怎么解决?

                                      joeQJ 離線
                                      joeQJ 離線
                                      joeQ
                                      寫於 最後由 編輯
                                      #66

                                      @wuhuan 您好!

                                      对于新的问题,可以发布新的Post。

                                      请问您安装的是Qt的哪一个版本?安装的时候,是可以skip跳过用户这一步骤的。安装开始界面有一个skip button。

                                      Just do it!

                                      1 條回覆 最後回覆
                                      0
                                      • Crawl.WC 離線
                                        Crawl.WC 離線
                                        Crawl.W
                                        寫於 最後由 編輯
                                        #67

                                        可以的,只是限制了国际友人支持的难度

                                        1 條回覆 最後回覆
                                        0
                                        • P 離線
                                          P 離線
                                          Princein
                                          寫於 最後由 編輯
                                          #68

                                          加油 go go go

                                          1 條回覆 最後回覆
                                          0

                                          • 登入

                                          • Login or register to search.
                                          • 第一個貼文
                                            最後的貼文
                                          0
                                          • 版面
                                          • 最新
                                          • 標籤
                                          • 熱門
                                          • 使用者
                                          • 群組
                                          • 搜尋
                                          • Get Qt Extensions
                                          • Unsolved