Skip to content

Chinese

A forum for those speaking Chinese
710 Topics 1.8k Posts
  • 如何在不违反Qt授权条款的情况下开发免费软件?

    2
    0 Votes
    2 Posts
    6k Views
    W
    我好像听说,用动态链接,不修改源码,并且 附带协议文件,就没问题, 但我也不太确定,我最近也在纠结这个问题,希望有人可以指点一下
  • 如何创建不规则形状的qml组件

    5
    0 Votes
    5 Posts
    8k Views
    S
    关于不规则控件,实时上有两点需要处理 (1)外观:这个可以用png或shader实现 (2)事件区域限制:这个我编写了个ImageMouseArea,希望对大家有用 @import QtQuick 2.0 /** \title 图像鼠标区域(可获取点击点的像素是否是透明的) \qml Image{ source: 'pentagon.png' anchors.centerIn: parent; ImageMouseArea{ imageUrl: 'pentagon.png' anchors.fill: parent onPressed: { if (!isCurrentPointTransparent()) console.log('pressed') } } } */ MouseArea { anchors.fill: parent // png图片 property alias imageUrl: canvas.imageUrl // 当前点是否是透明的,请在鼠标事件中调用 function isCurrentPointTransparent(){ return canvas.isTransparent(mouseX, mouseY); } // 用canvas保存图像信息,并用于点击检测 Canvas { id: canvas; anchors.fill: parent contextType: "2d"; visible: false; z: 2; property string imageUrl: 'roundmenu.png'; function isTransparent(x, y){ if (imageUrl == null) return true; else{ var p = context.getImageData(x, y, 1, 1).data; var r = p[0]; var g = p[1]; var b = p[2]; var a = p[3]; console.debug("(" + x + "," + y + "): "+ r + "," + g + ',' + b + ',' + a); return (a==0); } } onPaint: { if(imageUrl != null){ context.drawImage(imageUrl, 0, 0); } } } } @
  • SetStyleSheet给QPushButton设置样式的问题

    2
    0 Votes
    2 Posts
    2k Views
    IamSumitI
    您好,请通过下面的链接 "这里":http://qt-project.org/doc/qt-4.8/stylesheet-examples.html
  • 新手 Qt5.3.2 安装问题求帮助

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Qt5如何实现屏幕翻转

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Main函数里面QMessageBox的exec返回0

    2
    0 Votes
    2 Posts
    2k Views
    J
    不能这么写呢。因为QApplication都没有机会运行,主循环没有启动。
  • 0 Votes
    2 Posts
    2k Views
    J
    这个不可能完全一样的。有警告是正常的,不影响使用。
  • 0 Votes
    2 Posts
    2k Views
    J
    应该指的是你的Qt Creator中的Designer吧。 重新安装一下? 不过呢,最好检查一下显卡驱动,现在要跑Qt Creator,对显卡的要求变高了。尤其是针对Windows用户。
  • Qt5.3.2遇到的问题

    2
    0 Votes
    2 Posts
    2k Views
    J
    如果有截图的话,麻烦提出来吧。
  • QT 连接QPSQL 连接不上

    2
    0 Votes
    2 Posts
    2k Views
    J
    把插件DLL也拷贝到你的DEBUG目录下试试?
  • 为毛我不能回复帖子了?求破!

    2
    0 Votes
    2 Posts
    2k Views
    J
    似乎是这个页面用的google API的问题哈,刚Post a reply编辑框一直没有格式工具栏,现在有了就能回复帖子了。 这个google API咋这么慢呢?
  • QSerialPort支持115200以上的波特率吗?

    2
    0 Votes
    2 Posts
    2k Views
    J
    试试不就知道了?不过你得有支持115200以上波特率的硬件才行,普通台式机最高也就115200了
  • Bug in Qt 5.3.1 ??

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • 有人做过UDP nat穿透的没,用QT实现?

    7
    0 Votes
    7 Posts
    4k Views
    F
    [quote author="Ildar" date="1410842897"]bq. clientB to connecte clientA UDP are can not establish connection, only send and receive messages. Maybe I did not understood you correctly And are you can show problem code?[/quote] you can download my code form this address. http://www.qtcn.org/bbs/read-htm-tid-57400.html
  • 怎样使用qt实现GNU radio类似的图形界面

    2
    0 Votes
    2 Posts
    3k Views
    V
    單參考 Qt designer source code, 不行嗎?
  • QT creator Cannot open source file

    3
    0 Votes
    3 Posts
    3k Views
    B
    @Dheerendra Dheerendra project type:Qt4 Gui Application I can see the main.cpp I can create new project but can't run as the same reason; I can clean and qmake that pro.,but when run it ,give me the error msg : Cannot find source file :‘.\main.cpp’ No such file or directory Cannot find source file :‘.\mainwindow.cpp’ No such file or directory the project name is testAgain,in that *.pro file I can see the info.as belowe: #--------------------------------------------- project cerate by Qt Creator 2014-09-05t09:53:21 #--------------------------------------------- TARGET = testAgain TEMPLATE = app SOURCES += main.cpp mainwindow.cpp HEADERS += mainwindow.h FORM += mainwindow.ui so you can see I haven't change anyting before add my owner code to this project ,it just cannot work. The strange is ,if I use VS to create the same Qt project ,nothing go wrong ! But I need to use Qt creator in a straightway > _ <
  • 0 Votes
    1 Posts
    1k Views
    No one has replied
  • Qtcreate>帮助>搜索啥也查不到

    3
    0 Votes
    3 Posts
    3k Views
    S
    @jiangcaiyang 你这个方法只是“帮助-》索引”功能的快捷键 我想要的是全文检索,我记得qt 5.1的“帮助-》查找”有这个功能,甚至可以查到示例项目的代码。不知怎么整的,新版本这个功能失效了。 举个实际的栗子: 我想查找QML Canvas.onPaint 的详细使用方法,用索引方法查 Canvas 或 paint 都只能得到一个泛泛的api说明而已。如果全文检索(帮助-》查找)的话,这些就不是问题了。
  • Qt4助手 assistant 无法启动

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • QTableWidget 打印预览问题

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied