-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstudentprojectview.cpp
More file actions
41 lines (35 loc) · 989 Bytes
/
Copy pathstudentprojectview.cpp
File metadata and controls
41 lines (35 loc) · 989 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include "studentprojectview.h"
#include "ui_studentprojectview.h"
#include <QDebug>
#include <QListWidgetItem>
studentProjectView::studentProjectView(QWidget *parent) :
QDialog(parent),
ui(new Ui::studentProjectView)
{
ui->setupUi(this);
for(int i=1; i<=20; i++)
{
ui->listWidget->addItem("Project "+ QString::number(i));
// ui->textBrowser->setText("Hello");
}
}
studentProjectView::~studentProjectView()
{
delete ui;
}
void studentProjectView::on_registerButton_clicked()
{
QListWidgetItem *item = ui->listWidget->currentItem();
item->setTextColor(Qt::red);
}
void studentProjectView::on_listWidget_doubleClicked(const QModelIndex &index)
{
// QModelIndex i = ui->listWidget->currentIndex();
// qDebug()<<index;
//tatic int i=1;
// ui->textBrowser->setText("Hello I am project "+ QString::number(i));
// i++;
}
void studentProjectView::on_listWidget_itemDoubleClicked(QListWidgetItem *item)
{
}