Member Avatar
Reusable Code Snippet Exploring the PySide Label

A small test program exploring the PySide/PyQT Label widget. With HTML code you can do some nice formatting of the label's text.

+5 forum 0
Member Avatar

in this program i'm writing the functions that have qt classes as parameters Qlabel, QSpinbox, etc. are causing compile errors, my other functions work fine i get the same 2 errors for each QT object i use as an argument this is the function definition that uses QT classes as 3 of the parameters the first isnt [CODE] void fraction::displayfraction(fraction toDis, QLabel nWhole, QLabel nNum, QLabel nDen) { nWhole.setText(QString::number(toDis.Whle())); nNum.setText(QString::number(toDis.Num())); nDen.setText(QString::number(toDis.Den())); }[/CODE] this is a test function call that causes the error [CODE]MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); fraction myfraction(7,4,5); QLabel d; QLabel n; QLabel w; /*error function*/myfraction.displayfraction(myfraction,w,n,d); …

Member Avatar
+0 forum 3

The End.