Statusbar
Main window
The QtGui.QMainWindow
class provides a main application window. This enables to create a classic application skeleton with a statusbar, toolbars, and a menubar.
Statusbar
A statusbar is a widget that is used for displaying status information.
#!/usr/bin/python
# -*- coding: utf-8 -*- """
ZetCode PyQt4 tutorial This program creates a statusbar. author: Jan Bodnar
website: zetcode.com
last edited: September 2011
""" import sys
from PyQt4 import QtGui class Example(QtGui.QMainWindow): def __init__(self):
super(Example, self).__init__() self.initUI() def initUI(self): self.statusBar().showMessage('Ready') self.setGeometry(300, 300, 250, 150)
self.setWindowTitle('Statusbar')
self.show() def main(): app = QtGui.QApplication(sys.argv)
ex = Example()
sys.exit(app.exec_()) if __name__ == '__main__':
main()
The statusbar is created with the help of the QtGui.QMainWindow
widget.
self.statusBar().showMessage('Ready')
To get the statusbar, we call the statusBar()
method of the QtGui.QMainWindow
class. The first call of the method creates a status bar. Subsequent calls return the statusbar object. The showMessage()
displays a message on the statusbar.
Statusbar的更多相关文章
- 使用Xamarin开发iOS7应用时隐藏StatusBar方法
在iOS7之前如果需要隐藏StatusBar,比较简单,直接在AppDelegate.cs中使用如下代码就可以进行隐藏: UIApplication.SharedApplication.StatusB ...
- 【Windows编程】系列第六篇:创建Toolbar与Statusbar
上一篇我们学习了解了如何使用Windows GDI画图,该应用程序都是光光的静态窗口,我们使用Windows应用程序,但凡稍微复杂一点的程序都会有工具栏和状态栏,工具栏主要用于一些快捷功能按钮.比如典 ...
- iOS9,导航控制器中的子控制器设置StatusBar状态失效的问题
iOS9之前控制StatusBar的两种方式: 第一种方式:全局控制StatusBar 1. 在项目的Info.plist文件里设置UIViewControllerBasedStatusBarAppe ...
- ios 实现自定义状态栏StatusBar 和 导航栏navigationBar 的状态和颜色
很多app中可以看到不同与导航栏的状态栏的颜色,他妈的真绕嘴. 一.更改状态栏颜色 (StatusBar) 就是比如导航栏是红色的状态栏是绿色的. 要实现这样的效果其实很简单,就是添加一个背景view ...
- 关于StatusStrip控件和StatusBar控件的小试
今天,在网上查找资料,突然看到一个例子,但例子中提及的StatusBar控件,我发现在vs控件压根不存在,我就郁闷了,于是上网查找才知道,现在这个控件已经被StatusStrip控件给吞了,Statu ...
- Android应用:StatusBar状态栏、NavigationBar虚拟按键栏、ActionBar标题栏、Window屏幕内容区域等的宽高
一.屏幕中各种栏目以及屏幕的尺寸 当我们需要计算屏幕中一些元素的高度时,或许需要先获取到屏幕或者各种栏目的高度,下面这个类包含了Status bar状态栏,Navigation bar虚拟按键栏,Ac ...
- [转载]ExtJs4 笔记(12) Ext.toolbar.Toolbar 工具栏、Ext.toolbar.Paging 分页栏、Ext.ux.statusbar.StatusBar 状态栏
作者:李盼(Lipan)出处:[Lipan] (http://www.cnblogs.com/lipan/)版权声明:本文的版权归作者与博客园共有.转载时须注明本文的详细链接,否则作者将保留追究其法律 ...
- iOS开发中的错误整理,iOS9之后的UIWindow(TopWindow)以及UIWindow与statusBar的关系
iOS9之后的UIWindow的问题(TopWindow),以及UIWindow与statusBar之间的联系 1.出现的问题 iOS9之后UIWindow必须要指定一个根控制器,不然会报错!iOS9 ...
- statusbar 样式
1:statusBar字体为白色 在plist里面设置View controller-based status bar appearance 为 NO:设置statusBarStyle 为 UISta ...
- React Native组件之ScrollView 和 StatusBar和TabBarIos
React Native中的组件ScrollView类似于iOS中的UIScrollView,其基本的使用方法和熟悉如下: /** * Sample React Native App * https: ...
随机推荐
- spring---aop(1)---AOP概念
写在前面 由于spring的事务系列,可以带出spring的aop.spring的事务只是spring的一个具体实现 名词解释 通知.增强处理(Advice) 就是你想要的功能,也就是上说的安全.事物 ...
- java中HashMap在多线程环境下引起CPU100%的问题解决
最近项目中出现了Tomcat占用CPU100%的情况,原以为是代码中出现死循环,后台使用jstack做了dump,发现是系统中不合理使用HashMap导致出现了死循环(注意不是死锁). 产生这个死循环 ...
- gulp编译出现Cannot find module 'internal/util/types'——node环境的变更
一心埋头敲代码,再回首,nodejs都蹦跶到8.9版本了,为了跟上时代,妥妥的赶紧升级啊,升级的结果...Cannot find module 'internal/util/types'... 于 ...
- POJ 1470 Closest Common Ancestors (LCA,离线Tarjan算法)
Closest Common Ancestors Time Limit: 2000MS Memory Limit: 10000K Total Submissions: 13372 Accept ...
- 通过adb把apk安装到系统分区
通过adb把apk安装到系统分区 以谷歌拼音为例:GooglePinyin1.4.2.apk提取出so文件libjni_googlepinyinime_4.solibjni_googlepinyini ...
- 在win7下安装VC6.0
一.以系统管理员的身份执行VC6.0安装文件 二.在安装或者使用VisualC++6.0时,凡是出现兼容性问题提示对话框,一律按下面方式处理--把"不再显示此消息"打上勾,然后选择 ...
- C#高性能大容量SOCKET并发(转)
C#高性能大容量SOCKET并发(零):代码结构说明 C#高性能大容量SOCKET并发(一):IOCP完成端口例子介绍 C#高性能大容量SOCKET并发(二):SocketAsyncEventArgs ...
- Xcode插件管理器Alcatraz的使用
Xcode插件管理器Alcatraz的使用 下载地址 https://github.com/alcatraz/Alcatraz 下载软件包 解压以及编译 重启Xode并Load Bundle 安装插件 ...
- jquery实现上线翻滚效果公告
//样式文件: <style type="text/css"> * { margin:; padding:; } .scrollNews { width: 100%; ...
- 表单提交的3种方式,http post的contentType
application/x-www-form-urlencoded:窗体数据被编码为名称/值对.这是标准的编码格式.这是默认的方式 multipart/form-data:窗体数据被编码为一条消息,页 ...