码迷,mamicode.com
首页 >  
搜索关键字:qapplication    ( 285个结果
Qt_Window@Qt Command Prompt从命令行创建工程
#include #include int main(int argc, char *argv[]){ QApplication app(argc, argv); QLabel *label = new QLabel("Hello Qt!"); label->show(); return app.e...
分类:Windows程序   时间:2015-06-07 18:50:35    阅读次数:454
Qt 无边框、透明、可移动、的个性窗体案例详解
很多朋友都问透明的效果怎么做,为什么自己做的无边框窗体不可移动,一个个回答的很累,干脆写出来分享下好了.intmain(intargc,char*argv[]){QApplication::setStyle("cleanlooks");QApplicationa(argc,argv);loginw;...
分类:移动开发   时间:2015-06-05 19:32:27    阅读次数:146
QT_StepByStep(2)--滑动杆的实现
1、实现效果图: 2、代码清单:#include #include #include #include #include int main(int argc, char *argv[]) { QApplication app(argc, argv); QWidget *window = new QW...
分类:其他好文   时间:2015-05-25 14:24:27    阅读次数:130
QT_StepByStep(2)--初体验hello world!(1)
例程一:hello world! 支持HTML语言解析。#include #include int main(int argc, char *argv[]) { QApplication app(argc,argv); QLabel *label=new QLabel("hello,world ")...
分类:其他好文   时间:2015-05-25 14:23:27    阅读次数:112
Qt 设置窗口居中显示和窗体大小
设置窗口居中显示方法一:在窗口(QWidget类及派生类)的构造函数中添加如下代码:#include //.......QDesktopWidget* desktop = QApplication::desktop(); // =qApp->desktop();也可以move((desktop->w...
分类:Windows程序   时间:2015-05-21 17:11:34    阅读次数:175
Qt For Android 如何获取手机屏幕大小
获取方法首先看一段程序代码:int main(int argc, char *argv[]) { QApplication a(argc, argv); Dialog w; w.show(); return a.exec(); }a为应用程序,w为对话框;我们获取屏幕大小,需要从变量a这里获取; QScreen *iScreen = a.primaryScreen...
分类:移动开发   时间:2015-05-11 10:52:18    阅读次数:208
PyQt5 写一个计算器框架
import sys from PyQt5.QtWidgets import QWidget, QLabel, QApplication, QPushButton, QHBoxLayout, QVBoxLayout, QGridLayout class Example(QWidget): def __init__(self): super().__init__()...
分类:其他好文   时间:2015-05-02 09:50:17    阅读次数:266
PyQt5 来写一个评论框
import sys from PyQt5.QtWidgets import QWidget, QLabel, QApplication, QLineEdit, QTextEdit, QGridLayout class Example(QWidget): def __init__(self): super().__init__() self.initUI()...
分类:其他好文   时间:2015-05-02 09:49:28    阅读次数:213
PyQt5 消息框
import sys from PyQt5.QtWidgets import QApplication, QWidget, QMessageBox class Example(QWidget): def __init__(self): super().__init__() self.initUI() def initUI(self): ...
分类:其他好文   时间:2015-04-29 10:12:21    阅读次数:215
PyQt5 窗口定于屏幕中心
import sys from PyQt5.QtWidgets import QApplication, QWidget, QDesktopWidget class Example(QWidget): def __init__(self): super().__init__() self.initUI() def initUI(self): ...
分类:其他好文   时间:2015-04-29 10:09:32    阅读次数:154
285条   上一页 1 ... 20 21 22 23 24 ... 29 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!