Skip to content

Chinese

A forum for those speaking Chinese
710 Topics 1.8k Posts
  • QT/Embedded 哪个版本开始支持OpenGL?

    2
    0 Votes
    2 Posts
    2k Views
    J
    Qt4.2开始。
  • 0 Votes
    4 Posts
    4k Views
    W
    你好,可以说一下你的步骤吗?我在windows下先安装dbus-1.4.1,然后再编译QDBus源码生成QDBus模块,最后运行自带的example时无法通信,连接不上总线。
  • QT 5.1程序分布的问题

    2
    0 Votes
    2 Posts
    2k Views
    S
    plugin没有需要带上 在plugins\sqldrivers下,看下qt部署部分 http://qt-project.org/doc/qt-4.8/deployment-windows.html
  • Bug ? QSqlQuery::lastInsertId() const

    2
    0 Votes
    2 Posts
    2k Views
    SGaistS
    Hi, AFAIK, lastInsertId reports the id of the most recent inserted record. The action of deleting them doesn't change that value. The next insert query will update it
  • 如何在quick control中改变button上的显示文字的颜色.

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • 0 Votes
    2 Posts
    3k Views
    7611534547
    class A :public QGraphicsObject { A() { QLineF line(…..); QGraphicsLineItem* lineSeg = new QGraphicsLineItem(line); lineSeg->installSceneEventFilter(this); registerGraphicsItemInScene(lineSeg); } bool sceneEventFilter(QGraphicsItem * watched, QEvent * event) { QMessageBox msgBox; msgBox.setText(_blockItem->name()); msgBox.exec(); switch(event->type()) { case QEvent::MouseButtonDblClick: return true; case QEvent::MouseButtonPress: return true; case QEvent::MouseButtonRelease: return true; } return QGraphicsItem::sceneEventFilter(watched, event); } } main() { A a; registerGraphicsItemInScene(&a); …….. }
  • 在mainwindow上怎么做一个浮动的菜单栏?

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • 0 Votes
    2 Posts
    3k Views
    L
    我在pro中引用了 opengl,去掉后窗口可以正常旋转了。
  • Qt5.1.0 重新编译选项 -openssl-linked 有人用过吗,怎么弄?

    3
    0 Votes
    3 Posts
    5k Views
    J
    我试过几种方法。 使用-openssl-linked的话,会在编译器确定openssl的依赖关系,而不是在运行期解析OpenSSL动态库的函数。但其实还是需要依赖libeay.dll和ssleay.dll的。 所以到www.openssl.org下载源码,不要下载OpenSSL-Win32,自己编译OpenSSL。这里还有一些麻烦导致链接错误就不说了。 其实还是觉得TDM-MinGW比MinGW好用,因为它默认是静态编译的。
  • 碰到个好奇怪的问题

    7
    0 Votes
    7 Posts
    4k Views
    E
    [quote author="jiangcaiyang" date="1375233704"]在游戏中一般是这么写的。 但是呢,我昨晚想了一下,我以前在使用QWidget的时候,还可以这么写。 @Widget::paintEvent( QPaintEvent* pEvent ) { DoSomeRendering( ); repaint( );// 或者update( )如果你需要来自队列的渲染指令的话 }@ 这样毫不影响对X按钮关闭的操作。[/quote] 的确啊~原来还以为repaint也是经过队列的~一直搞混了,多谢!准备为事件做个过滤,一旦开始刷新,只接受自己需要的事件...
  • [讨论]关于Qt下图形与图像的叠加显示方案

    11
    0 Votes
    11 Posts
    17k Views
    V
    我說了重點是 scene graph. Qt Quick Controls 用 scene graph rendering, QGraphicsScene 不是用 scene graph rendering, 所以 QGraphicsScene rendering效率理應 比Qt Quick Controls差. "http://stackoverflow.com/questions/16267404/qt-quick-vs-graphics-view-framework-qgraphicsscene":http://stackoverflow.com/questions/16267404/qt-quick-vs-graphics-view-framework-qgraphicsscene "In Qt4, I don't think QML is going to give any peformance advantage, as I think (did not verify now) there it is written on top QGraphicsView stuff." "numbers from running the photoviewer demo":http://blog.qt.digia.com/wp-content/uploads/2011/05/numbers.png
  • 0 Votes
    5 Posts
    9k Views
    J
    还有$${Qt安装目录}/qtdeclarative/tools也一样。
  • QT访问access中文乱码的问题

    3
    0 Votes
    3 Posts
    3k Views
    E
    你的链接...是打开个人网盘的啊 另外数据库里边的中文是用什么编码的呢? 调整下就行了
  • Qt 5.1 RC版能支持静态编译了吗? 能进行IOS开发了吗?

    7
    0 Votes
    7 Posts
    5k Views
    E
    [quote author="Jonix" date="1372207834"]搞来搞去, 在这里活跃的人还都是skype群或csdn中几个份子呀 ... ...[/quote] 怪不得贴吧都没人...
  • 有关Qserialport的疑问

    4
    0 Votes
    4 Posts
    3k Views
    D
    哦对了你的构造函数还要加上表示串口的字符串作为参数。比如Windows就是类似于"COM3"这样的,Mac和Linux就是“/dev/”开头的。
  • 使用QT_NO_MESSAGEBOX编译qt发现,无法生成QtGui.lib了!

    2
    0 Votes
    2 Posts
    2k Views
    J
    没有用过啊,为什么要禁用MessageBox呢?
  • Qt有没有第三方的数据表格控件?

    6
    0 Votes
    6 Posts
    11k Views
    T
    请访问 http://qt-apps.org/ ,这里或许有你理想的控件。
  • 【已解决】Qt无边框MainWindow如何拖动四周改变大小?

    5
    0 Votes
    5 Posts
    13k Views
    T
    你需要重新处理部分窗体事件,以下代码适用于Windows平台,仅供参考! @ bool MainWindow::winEvent(MSG *msg, long *result) { switch (msg->message) { case WM_NCHITTEST: { *result = 0; const LONG border_width = 8; //in pixels RECT winrect; GetWindowRect(winId(), &winrect); long x = GET_X_LPARAM(msg->lParam); long y = GET_Y_LPARAM(msg->lParam); bool resizeWidth = minimumWidth() != maximumWidth(); bool resizeHeight = minimumHeight() != maximumHeight(); if(resizeWidth) { //left border if (x >= winrect.left && x < winrect.left + border_width) { *result = HTLEFT; } //right border if (x < winrect.right && x >= winrect.right - border_width) { *result = HTRIGHT; } } if(resizeHeight) { //bottom border if (y < winrect.bottom && y >= winrect.bottom - border_width) { *result = HTBOTTOM; } //top border if (y >= winrect.top && y < winrect.top + border_width) { *result = HTTOP; } } if(resizeWidth && resizeHeight) { //bottom left corner if (x >= winrect.left && x < winrect.left + border_width && y < winrect.bottom && y >= winrect.bottom - border_width) { *result = HTBOTTOMLEFT; } //bottom right corner if (x < winrect.right && x >= winrect.right - border_width && y < winrect.bottom && y >= winrect.bottom - border_width) { *result = HTBOTTOMRIGHT; } //top left corner if (x >= winrect.left && x < winrect.left + border_width && y >= winrect.top && y < winrect.top + border_width) { *result = HTTOPLEFT; } //top right corner if (x < winrect.right && x >= winrect.right - border_width && y >= winrect.top && y < winrect.top + border_width) { *result = HTTOPRIGHT; } } if(*result == 0) return QWidget::winEvent(msg,result); return true; break; } //end case WM_NCHITTEST default: return QWidget::winEvent(msg,result); } } @
  • Qt的官方博客有中文的版本了

    6
    0 Votes
    6 Posts
    5k Views
    N
    我也在学习Qt,感觉资料不是很容易找到。
  • QT 5.2 什么时候出来 就是能很好支持安卓的

    5
    0 Votes
    5 Posts
    11k Views
    T
    想了解 Qt 的开发进度 您可以访问 https://bugreports.qt-project.org