Bug Fix: Table widget header not visible on Ubuntu

This commit is contained in:
yonghye 2018-11-01 10:34:18 +09:00
parent 37f34ef7e6
commit 498301a720
3 changed files with 23 additions and 7 deletions

View File

@ -34,8 +34,6 @@ MainWindow::MainWindow(QWidget *parent) :
connect(new QShortcut(QKeySequence(Qt::Key_D), this), SIGNAL(activated()), this, SLOT(next_img()));
connect(new QShortcut(QKeySequence(Qt::Key_Space), this), SIGNAL(activated()), this, SLOT(next_img()));
ui->tableWidget_label->horizontalHeader()->setStyleSheet("");
disconnect(ui->tableWidget_label->horizontalHeader(), SIGNAL(sectionPressed(int)),ui->tableWidget_label, SLOT(selectColumn(int)));
}
MainWindow::~MainWindow()
@ -290,6 +288,7 @@ void MainWindow::pjreddie_style_msgBox(QMessageBox::Icon icon, QString title, QS
msgBox.setFont(font);
msgBox.button(QMessageBox::Ok)->setFont(font);
msgBox.button(QMessageBox::Ok)->setStyleSheet("border-style: outset; border-width: 2px; border-color: rgb(0, 255, 0); color : rgb(0, 255, 0);");
msgBox.button(QMessageBox::Ok)->setFocusPolicy(Qt::ClickFocus);
msgBox.setStyleSheet("background-color : rgb(34, 0, 85); color : rgb(0, 255, 0);");
msgBox.exec();
@ -387,3 +386,11 @@ void MainWindow::on_horizontalSlider_images_sliderMoved(int position)
void MainWindow::on_horizontalSlider_images_sliderPressed()
{
}
void MainWindow::init_tableWidget()
{
ui->tableWidget_label->horizontalHeader()->setVisible(true);
ui->tableWidget_label->horizontalHeader()->setStyleSheet("");
disconnect(ui->tableWidget_label->horizontalHeader(), SIGNAL(sectionPressed(int)),ui->tableWidget_label, SLOT(selectColumn(int)));
}

View File

@ -60,6 +60,9 @@ private:
QStringList m_labelNameList;
int m_labelIndex;
void init_tableWidget();
void init();
void img_open(const int);

View File

@ -433,10 +433,16 @@ border-color: rgb(0, 255, 255);</string>
<widget class="QCheckBox" name="checkBox_cropping">
<property name="minimumSize">
<size>
<width>90</width>
<width>100</width>
<height>21</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="font">
<font>
<weight>75</weight>
@ -473,13 +479,13 @@ border-color: rgb(0, 255, 255);</string>
<property name="minimumSize">
<size>
<width>41</width>
<height>12</height>
<height>15</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>12</height>
<height>15</height>
</size>
</property>
<property name="font">
@ -507,7 +513,7 @@ border-color: rgb(0, 255, 255);</string>
</property>
<property name="minimumSize">
<size>
<width>640</width>
<width>545</width>
<height>70</height>
</size>
</property>
@ -660,7 +666,7 @@ QTableView {
<number>2</number>
</property>
<attribute name="horizontalHeaderVisible">
<bool>false</bool>
<bool>true</bool>
</attribute>
<attribute name="horizontalHeaderHighlightSections">
<bool>false</bool>