You can add Icons to many types of QWidgets. PySide provides you with a method to access the native system icons. A complete list of icons can be found here: PySide.QtGui.PySide.QtGui.QStyle.StandardPixmap To apply the QIcon you need to [python] btn = QPushButton("Folder") style = btn.style() icon = style.standardIcon(QStyle.SP_DirIcon) btn.setIcon(icon) #or short: btn.setIcon(btn.style().standardIcon(QStyle.SP_DirIcon)) [/python] Here a …
Windows 8.1 finally gives you the option to boot directly to the desktop (without the need for a 3rd party program). You can enable this option by opening the preferences for the taskbar and go to the tab for “Navigation”.
Advanced Users can use the Registry to Boot to desktop by setting following key:
PySide (www.pyside.org) is an awesome Framework that allows you to use Qt with Python. Installation is as straightforward as typing
pip install pyside
I will be creating a menu that opens with a right click.
This menu is called “Context Menu” in QT.
In this example, the right-click menu on the button removes the button at runtime.
import sys from PySide.QtCore import * from PySide.QtGui import * class RightClickMenuButton(QPushButton): def __init__(self, name, parent = None): super(RightClickMenuButton, self).__init__(name) self.setContextMenuPolicy(Qt.ActionsContextMenu) self.addMenuActions(); def addMenuActions(self): delete = QAction(self) delete.setText("remove") delete.triggered.connect(self.removeButton) self.addAction(delete) def removeButton(self): self.deleteLater() if __name__ == '__main__': app = QApplication(sys.argv) test = QWidget() test.resize(250, 150) layout = QHBoxLayout() layout.addWidget(RightClickMenuButton("Test Btn")) test.setLayout(layout) test.show() app.exec_()
Project Euler is a collection of challenging mathematical and computational problems. The first couple of problems are rather straightforward, however, the difficulty gets very hard after the first 10 problems.
So if you like programming and solve math problems go to www.projecteuler.net and try to solve a couple of the problems.
After the installation of Ubuntu, you want to start being productive as fast as possible. There are three things you need to do:
1. Install the Programs you need
2. Remove the unwanted pre-installed Programs (for example Amazon Integration, Rhythm box)
3. Install all System Updates
While you could use the Ubuntu Store to install all programs by clicking through various screens. You will have a great performance gain by using the console and the “apt-get” package manager.
In the spirit of never having to repeat myself, I simply collected all the console commands I needed to complete the three steps.
Your personal setup will be slightly different to my setup, feel free to modify and adjust the script to suit your needs.