Link Label
Qt Components
Score 52%
Description:

Class is a thin wraper above QLabel
Class can be used in mail clients, in QStakedWidget where many pages or content can take place.
Class has one interfase - ISetMaxLinkNumber(int) where you can define maximal number of pages in your link list.
And class emits signal linkPressed(int) with numerical page number.
Last changelog:

6 years ago

1. Interface become changed: ISetMaxLinkDiapazon(int min, int max) now you must set minimimum number and maximum number for link range
2. You can specify negative range of link label, for example:
linkLabel->ISetMaxLinkDiapazon(-100, 101);
Range will be from -100 to 101

daimonKor

6 years ago

QVBoxLayout *mainLayout = new QVBoxLayout;


QStackedWidget * stack = new QStackedWidget(&widget);

stack->addWidget(new QLabel("0"));
stack->addWidget(new QLabel("1"));
stack->addWidget(new QLabel("2"));
stack->addWidget(new QLabel("3"));

mainLayout->addWidget(stack);
mainLayout->addWidget(linkLabel);

QObject::connect(linkLabel,SIGNAL(linkPressed(int)),stack,SLOT(setCurrentIndex ( int )));

widget.setLayout(mainLayout);

i can not open a stackWidget index 0

Report

C

bloodshadow

6 years ago

Thank you, fixed
range can be negative now

Report

daimonKor

6 years ago

maybe there are negative number pages))))

Report

daimonKor

6 years ago

QVBoxLayout *mainLayout = new QVBoxLayout;


QStackedWidget * stack = new QStackedWidget(&widget);

stack->addWidget(new QLabel("0"));
stack->addWidget(new QLabel("1"));
stack->addWidget(new QLabel("2"));
stack->addWidget(new QLabel("3"));

mainLayout->addWidget(stack);
mainLayout->addWidget(linkLabel);

QObject::connect(linkLabel,SIGNAL(linkPressed(int)),stack,SLOT(setCurrentIndex ( int )));

widget.setLayout(mainLayout);

i can not open a stackWidget index 0

Report

daimonKor

6 years ago

QVBoxLayout *mainLayout = new QVBoxLayout;


QStackedWidget * stack = new QStackedWidget(&widget);

stack->addWidget(new QLabel("0"));
stack->addWidget(new QLabel("1"));
stack->addWidget(new QLabel("2"));
stack->addWidget(new QLabel("3"));

mainLayout->addWidget(stack);
mainLayout->addWidget(linkLabel);

QObject::connect(linkLabel,SIGNAL(linkPressed(int)),stack,SLOT(setCurrentIndex ( int )));

widget.setLayout(mainLayout);

i can not open a stackWidget index 0

Report

daimonKor

6 years ago

add emit signal, when the page is clicked

Report

daimonKor

6 years ago

sorry - found

Report

6 years ago

1. Interface become changed: ISetMaxLinkDiapazon(int min, int max) now you must set minimimum number and maximum number for link range
2. You can specify negative range of link label, for example:
linkLabel->ISetMaxLinkDiapazon(-100, 101);
Range will be from -100 to 101

product-maker daimonKor Jun 11 2011

product-maker 6 6

File (click to download) Version Description Filetype Packagetype License Downloads Date Filesize OCS-Install DL
Details
version
1.0
updated Jun 12 2011
added Jun 06 2011
downloads today
0
page views today 0