showfl / toou-2d Goto Github PK
View Code? Open in Web Editor NEW基于Qt Quick(Qml) 跨平台技术打造的2D框架
Home Page: http://www.toou.net
License: MIT License
基于Qt Quick(Qml) 跨平台技术打造的2D框架
Home Page: http://www.toou.net
License: MIT License
有没有统一的方式,虽然底下按钮不会响应点击,但是hover 样式还是会显示,还要手动hoverEnable 禁用掉,然后再设回来
您好,我在使用imagebutton做四状态按钮时发现source属性需要改个名字,比如normalsource,否则做四状态按钮时,悬停后离开按钮区域时背景图片停留在hover的背景上不变。如有说法不妥之处请谅解,非常感谢你。
最近想做个一个日历相关的APP,无意中发现吧这个例子,但好像下载不了。
好久不更新了,期待更新
您好
问题如题,不知道是不是这种设计思路,如果是这样设计感觉不妥。应该是有个判断如果qml文件中设置的有就用qml中的,否则就用INI中的。
您好
TPosition.Reght需要改为TPosition.Right
按wiki的方法构建动态库,在使用TToast组件时出现以下异常:
qrc:/net.toou.2d/controls/TToast.qml:101: TypeError: Cannot read property of null
in example.pro line 54
PRE_TARGETDEPS +=
but msvc don`t output *.a.
when I modify code:
PRE_TARGETDEPS +=
QQmlApplicationEngine failed to load component
qrc:/main.qml:3:1: plugin cannot be loaded for module "Toou2D": ??????F:/Qt/5.15.2/msvc2019/qml/Toou2D/Toou2Dd.dll?????????????Qt??(????????????????汾??????汾??)
复现步骤
1.打开demo程序
2.切换当前主题为theme-dark,将TRadioBox-A点成checked状态
3.切换theme-none,观察此时TRadioBox-A的bordercolor,并不是checked状态的bordercolor,错误。
4.TRadioBox同理。
问题分析
m_binderPropertys 存储的是控件初始化时的所有默认值。当用户操作或逻辑触发修改某些风格属性的值后,此时切换会none-theme,m_binderPropertys 并没有存储修改后的值,导致错误。
我开源了个项目,但是对Linux不熟悉,不知道这个2d框架能不能扩展Linux平台的qml组件库
大家好
我从Github上拉去了最新版的Toou-2D源码,使用Qt Creator 4.11.0打开目录下的Toou-2D.pro后,进行了编译,编译报了很多错误。
E:\yangyouguo\QT\Toou-2D-master\example\main.qml:93: error: Expected token ;' E:\yangyouguo\QT\Toou-2D-master\src-toou2d\controls\TDialogBasic.qml:137: error: Expected token
;'
E:\yangyouguo\QT\Toou-2D-master\src-toou2d\controls\TNavigationBar.qml:32: error: 正则表达式未结束
E:\yangyouguo\QT\Toou-2D-master\src-toou2d\controls\TRadioBox.qml:16: error: 正则表达式未结束
E:\yangyouguo\QT\Toou-2D-master\src-toou2d\controls\TSwitch.qml:10: error: 正则表达式未结束
是我的使用方法不对吗?还是我忘记安装了什么?
求各位大神指点一二,不胜感激
W libexample.so: qrc:/main.qml:6 module "Toou2D" plugin "Toou2D" not found
请问该怎么解决啊?
@ShowFL
windows build failed...
Cyclic dependency detected between "qrc:/net.toou.2d/controls/TToast.qml" and "qrc:/net.toou.2d/controls/TToast.qml"
Cyclic dependency detected between "qrc:/net.toou.2d/controls/TToast.qml" and "qrc:/net.toou.2d/controls/TRectangle.qml"
Cyclic dependency detected between "qrc:/net.toou.2d/controls/TToast.qml" and "qrc:/net.toou.2d/controls/TSVGIcon.qml"
Cyclic dependency detected between "qrc:/net.toou.2d/controls/TToast.qml" and "qrc:/net.toou.2d/controls/TIconButton.qml"
Cyclic dependency detected between "qrc:/net.toou.2d/controls/TToast.qml" and "qrc:/net.toou.2d/controls/TButton.qml"
Cyclic dependency detected between "qrc:/net.toou.2d/controls/TToast.qml" and "qrc:/net.toou.2d/controls/TMouseArea.qml"
Cyclic dependency detected between "qrc:/net.toou.2d/controls/TToast.qml" and "qrc:/net.toou.2d/controls/TLabel.qml"
Cyclic dependency detected between "qrc:/net.toou.2d/controls/TToast.qml" and "qrc:/net.toou.2d/controls/TAwesomeIcon.qml"
qrc:/net.toou.2d/controls/TPopover.qml:80:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
: otherData is undefined. Adding an object with a undefined member does not create a role for it.
大概看了下,没有看出来具体问题,开头那个循环依赖是什么问题,请教下?
Hi ShowFl:如题所述,在qt5.8.0 arm linux环境中,TProgressBar进度条没有显示出来,百分比数值显示正常。在qt5.9.7 windows中正常。
您好,我想将您这个项目通过cmake方式构建,下面这个gist里包含了我构建使用的CMakeLists.txt和相关文件,程序在Linux下可以正常构建并运行,而在Mac 下能够构建成功却始终不能运行,调了好久不知道在哪里有问题,希望您能够指导指导。 😃 期待您的回复。
Toou2D cmake文件结构如下:
CMakeLists.txt
cmake
|--Functions.cmake
|--info.plist.in
|--meta_Toou2D.hpp.in
icons
|--develop
| |--Toou2DExample.icns
|--release
| |--Toou2DExample.icns
|--testing
|--Toou2DExample.icns
我看网上说还有一个日程管理的demo,怎么不见了,demo只有一个网易云音乐的,感觉有点少
How do i set bodyComponent for tpopover, please?
The demo shows default component only.
TPosition.Reght
Reght是什么意思
是不是Right写错了
import QtQuick 2.0
import Toou2D 1.0
Item {
Loader{
id:cac_loader;
anchors.fill: parent;
asynchronous: true
onStatusChanged: bii.visible = status !==Loader.Ready
}
Component{
id: cacComponent
TFlickable{
anchors.horizontalCenter: parent.horizontalCenter
clip: true
contentWidth:width;
contentHeight: layout.height;
scrollBar.horizontal: false;
GridView{
id:layout
anchors.horizontalCenter: parent.horizontalCenter
width: 1024
height: 600
cellWidth: 320
cellHeight: 200
model: cac_model
delegate: cac_delegate
}
}
}
ListModel {
id: cac_model
ListElement {name: "空调一"}
ListElement {name: "空调二"}
ListElement {name: "空调三"}
ListElement {name: "空调四"}
ListElement {name: "空调五"}
ListElement {name: "空调六"}
ListElement {name: "空调七"}
ListElement {name: "空调八"}
}
Component{
id: cac_delegate
TButton{
label.text: name
label.font.bold: true;
label.color: "#FFF"
background.color: "#6AC044"
theme.groupName: "success"
width: 300
height: 200
}
}
TBusyIndicator{
id:bii;
anchors.centerIn: parent;
}
Component.onCompleted: {
cac_loader.sourceComponent = cacComponent;
}
}
This project looks very interesting, it's not maintained anymore?
多个QQuickView窗口,在每个窗口初始化会奔溃,只能在一个窗口中初始化,但是在一个窗口中初始化,其他窗口用了组件
👎 error: [Makefile:365: ../bin/Toou2D/libToou2D.so] Error 1
是否有考慮支援i18n多國語言?
目的是想让 used_edit 和 total_edit 控件初始化时给其赋值,但是无论怎么操作都无法将值赋进去,一直无法找到 Item 中的对象
另外如何获取到 used_edit 和 total_edit 的值
import QtQuick 2.0
import Toou2D 1.0
TDialog {
id: config_page
titleText: ""
modalclose: false
property int min: 0
property int max: 9999
property int used: 0
property int total: 300
property var l: {"t1": "确定", "t2": "取消", "t3": "已用时间(分钟)", "t4": "使用寿命(分钟)", "t5": "刀具寿命"}
Item {
id: context
width: 576 * wRate
height: 200 * hRate
property alias usedText: used_edit.text
property alias totalText: total_edit.text
anchors {
top: parent.top
topMargin: height24
}
TLabel {
id: uesd_text
width: (parent.width - height48) / 2
height: height64
text: l.t3
font.pixelSize: fontSize20
verticalAlignment: Qt.AlignVCenter
anchors.left: parent.left
anchors.leftMargin: width24
}
TInputField {
id: used_edit
width: uesd_text.width
height: uesd_text.height
placeholderLabel.text: l.t5
inputMethodHints: Qt.ImhFormattedNumbersOnly
anchors.left: uesd_text.right
qtInput.validator: IntValidator {
top: max
bottom: min
}
}
TLabel {
id: total_text
width: uesd_text.width
height: uesd_text.height
text: l.t4
font.pixelSize: fontSize20
verticalAlignment: Qt.AlignVCenter
anchors.top: uesd_text.bottom
anchors.topMargin: 12 * hRate
anchors.left: uesd_text.left
}
TInputField {
id: total_edit
width: uesd_text.width
height: uesd_text.height
placeholderLabel.text: l.t5
anchors.top: total_text.top
anchors.left: total_text.right
qtInput.validator: IntValidator {
top: max
bottom: min
}
}
}
buttons: [
TDialogButton{
label.text: qsTr(l.t1)
label.font.pixelSize: fontSize20
label.color: "#46A0FC"
lighter: true
},
TDialogButton{
label.text: qsTr(l.t2)
label.font.bold: true
label.font.pixelSize: fontSize20
}
]
// 错误提示无法找到 context 对象
onUsedChanged: context.usedText = used.toString()
onTotalChanged: context.totalText = total.toString()
}
每次open 没有判断 是否已创建直接就create, 调用hideAndClose 或者close 没有destroy
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.