pyside QTableView disable edit mode

In default the QTableView will enable edit mode if user double clicks a table cell.

Following code will disable the edit mode:


In some old versions of Qt, QAbstractView will be used instead of QAbstractItemView. But in all versions of PySide, QAbstractView is not defined so QAbstractItemView need be used.

rigidbody2D.velocity.y not working

I’m really new to Unity and want to add a sprite and move it by press “left” and “right” key.

First I add a RigidBody component to the sprite, then add a Script Component.

Following is the code of script file:

But after I pressed the left key, “left” string is outputted to the console, but the sprite never moved. After a lot of trying, I found it’s because I used “RigidBody” component but not “RigidBody2D” component for the sprite. What a foolish mistake.. payment not shown in Magento checkout page

There are mainly two reasons causing that payment method not showing in Magento checkout page


The Mage_Authorizenet and Mage_Payment module is not enabled

In Admin page, go to System->Configuration menu. In Advanced->Advanced section at left panel, enable the "Mage_Authorizenet" and "Mage_Payment" module.


The magento currency is not same as currency

Assume you are using US Dollar as your currency.

In Admin page go to System->Configuration menu. In General->Currency Setup section, set the Base Currency and Default Display Currency to "US Dollar". Then go to Sales->Payment Methods section, under (or Direct Post) tab, change the Accepted Currency to "US Dollar".