Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Qt spinning box

QSpinBox {
    padding-right: 15px; /* make room for the arrows */
    border-image: url(:/images/frame.png) 4;
    border-width: 3;
}

QSpinBox::up-button {
    subcontrol-origin: border;
    subcontrol-position: top right; /* position at the top right corner */

    width: 16px; /* 16 + 2*1px border-width = 15px padding + 3px parent border */
    border-image: url(:/images/spinup.png) 1;
    border-width: 1px;
}

QSpinBox::up-button:hover {
    border-image: url(:/images/spinup_hover.png) 1;
}

QSpinBox::up-button:pressed {
    border-image: url(:/images/spinup_pressed.png) 1;
}

QSpinBox::up-arrow {
    image: url(:/images/up_arrow.png);
    width: 7px;
    height: 7px;
}

QSpinBox::up-arrow:disabled, QSpinBox::up-arrow:off { /* off state when value is max */
   image: url(:/images/up_arrow_disabled.png);
}

QSpinBox::down-button {
    subcontrol-origin: border;
    subcontrol-position: bottom right; /* position at bottom right corner */

    width: 16px;
    border-image: url(:/images/spindown.png) 1;
    border-width: 1px;
    border-top-width: 0;
}

QSpinBox::down-button:hover {
    border-image: url(:/images/spindown_hover.png) 1;
}

QSpinBox::down-button:pressed {
    border-image: url(:/images/spindown_pressed.png) 1;
}

QSpinBox::down-arrow {
    image: url(:/images/down_arrow.png);
    width: 7px;
    height: 7px;
}

QSpinBox::down-arrow:disabled,
QSpinBox::down-arrow:off { /* off state when value in min */
   image: url(:/images/down_arrow_disabled.png);
}
Comment

PREVIOUS NEXT
Code Example
Python :: Compute p-value 
Python :: pypy tinytag 
Python :: float decimals 
Python :: Python RegEx Escape – re.escape() Syntax 
Python :: different accuracy score for knn 
Python :: stripe white space django template 
Python :: compresser fichier pyhton 
Python :: Create an x amount of unique random fixed size strings 
Python :: pandas to_csv adds unnamed column 
Python :: decorrelation of data using PCA 
Python :: pandas read s3 object in jupyter notebook 
Python :: Creating a bag-of-words in scikit-learn 
Python :: change legend facecolor 
Python :: how to prefix numbers with zero in python 
Python :: barplot hatch 
Python :: Filling or replacing the missing values with mode 
Python :: pytorch plot batch 
Python :: Combine first and last 3 columns into new dataframe 
Python :: Open a web browser in Python 
Python :: python detect ranges in list 
Python :: python dataframe update if not new row 
Python :: calculate speed with time in datetime python 
Python :: string to date in BQ 
Python :: getting input from button python 
Python :: créer un dict python avec une liste 
Python :: mass algorithm python 
Python :: add a new categorical column to an existing table python 
Python :: emacs shift region left python 
Python :: pydrive list shared folder 
Python :: randian angle to degrees using numpy 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =