Skip to content
This repository has been archived by the owner on Oct 26, 2020. It is now read-only.

Commit

Permalink
Add new button menu
Browse files Browse the repository at this point in the history
  • Loading branch information
LuqueDaniel committed Jan 11, 2013
1 parent 8fcbad5 commit e5bcb91
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions minecraft_backup/gui/main.py
Expand Up @@ -44,6 +44,7 @@
from PyQt4.QtGui import QListWidget
from PyQt4.QtGui import QListWidgetItem
from PyQt4.QtGui import QPushButton
from PyQt4.QtGui import QMenu

# PyQt4.QtCore
from PyQt4.QtCore import QCoreApplication
Expand All @@ -69,25 +70,26 @@ def __init__(self):
self.setMaximumSize(700, 520)
center_widget(self)

#Header
self.header_label = QLabel(self)
self.header_label.resize(700, 170)
self.header_label.setPixmap(QPixmap(IMAGES['header']))

# btn_config
#menu_about
self.menu_about = QMenu(self)
self.menu_about.addAction('About Minecraft Backup Manager',
lambda: self.open_about_minebackup())
self.menu_about.addAction('About Qt', lambda: msg_about_qt(self))

#btn_config
self.btn_config = QPushButton(QIcon(IMAGES['config_icon']), '', self)
if sys.platform == 'win32':
self.btn_config.setGeometry(QRect(7, 27, 32, 32))
else:
self.btn_config.setGeometry(QRect(7, 7, 32, 32))
self.btn_config.setGeometry(QRect(7, 7, 32, 32))
self.btn_config.setToolTip('Configuration')

# menu bar
self.menu_bar = self.menuBar()

self.menu_help = self.menu_bar.addMenu('About')
self.menu_help.addAction('About Minecraft Backup Manager',
lambda: self.open_about_minebackup())
self.menu_help.addAction('About Qt', lambda: msg_about_qt(self))
#btn_about
self.btn_about = QPushButton('About', self)
self.btn_about.setGeometry(QRect(45, 7, 80, 32))
self.btn_about.setMenu(self.menu_about)

# list_backup
self.list_backup = QListWidget(self)
Expand Down

0 comments on commit e5bcb91

Please sign in to comment.