Qt for Android UI设计
来源:互联网 发布:土木工程设计软件 编辑:程序博客网 时间:2024/06/08 05:40
遇见的问题
1.UI设计的界面在真机上测试时,没有图片
2.整体图片都在左上角 而不是填充整个屏幕
3.Qlabel没有事件点击功能,触发需要升级
4.图片适应屏幕后,却变形
5.在frame上添加其他控件,控件会显示frame的背景图片
解决:
1.无论是在frame,widget,label上设置,都要设置sheetstyle,如果label的话,还要加上pixmap,并且scaledcontent。
2.把获取屏幕大小的语句写在set(ui)前边,
QDesktopWidget *dsk =QApplication::desktop();
this->resize(dsk->width(),dsk->height());
ui->setupUi(this);
就是布局成整个填充
3.升级
#ifndef SMARTLABEL_H#define SMARTLABEL_H#include"QtGui"#include<QLabel>class SmartLabel :public QLabel{Q_OBJECTpublic:
explicit SmartLabel(QWidget *parent = 0);virtual void mouseReleaseEvent(QMouseEvent *ev);signals:
void clicked();public slots:};#endif // SMARTLABEL_H
#include "smartlabel.h"SmartLabel::SmartLabel(QWidget *parent): QLabel(parent){}void SmartLabel::mouseReleaseEvent(QMouseEvent *ev){Q_UNUSED(ev)emit clicked();}4.暂时不知道如何设置,只是选取了合适大小的图片。5.在sheetstle里设置的时候加上# 名字 {资源地址}。
0 0
- Qt for Android UI设计
- Mono for Android UI设计器介绍
- QT中UI设计方略
- UI设计:Android Wear - Design Principles for Android Wear(设计准则)
- qt for android
- Qt for android安装
- Qt for android安装
- Qt for android
- Qt for Android
- qt for android
- Qt for android
- qt for android
- qt for android
- Qt for Android
- Qt For Android搭建
- Qt for Android
- Qt For Android
- Qt for Android(转)
- 4.22
- codeforces 797 E Array Queries
- 文本颜色
- Android动态加载技术三个关键问题详解
- JavaScript 3 变量及作用域
- Qt for Android UI设计
- redis-cluster和Spring集成,基于Cache注解
- learning-urdf-03
- 贪心之区域覆盖问题
- 严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderLis
- 谈谈HTTP协议中的短轮询、长轮询、长连接和短连接
- 设计模式之桥接模式
- 每个Java开发者应该知道(并爱上)的8个工具
- html列表