mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 13:30:34 +01:00
Minor change to be able to compile with Qt < 5.4
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4541 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -80,7 +80,7 @@ bool ElementsCollectionWidget::event(QEvent *event)
|
|||||||
{
|
{
|
||||||
if (m_first_show && event->type() == QEvent::WindowActivate) {
|
if (m_first_show && event->type() == QEvent::WindowActivate) {
|
||||||
m_first_show = false;
|
m_first_show = false;
|
||||||
QTimer::singleShot(250, this, &ElementsCollectionWidget::reload);
|
QTimer::singleShot(250, this, SLOT(reload()));
|
||||||
}
|
}
|
||||||
|
|
||||||
return QWidget::event(event);
|
return QWidget::event(event);
|
||||||
|
|||||||
@@ -65,13 +65,16 @@ class ElementsCollectionWidget : public QWidget
|
|||||||
void newElement();
|
void newElement();
|
||||||
void showThisDir();
|
void showThisDir();
|
||||||
void resetShowThisDir();
|
void resetShowThisDir();
|
||||||
void reload();
|
|
||||||
void search(const QString &text);
|
void search(const QString &text);
|
||||||
void hideCollection(bool hide = true);
|
void hideCollection(bool hide = true);
|
||||||
void hideItem(bool hide, const QModelIndex &index = QModelIndex(), bool recursive = true);
|
void hideItem(bool hide, const QModelIndex &index = QModelIndex(), bool recursive = true);
|
||||||
void showAndExpandItem (const QModelIndex &index, bool parent = true, bool child = false);
|
void showAndExpandItem (const QModelIndex &index, bool parent = true, bool child = false);
|
||||||
ElementCollectionItem *elementCollectionItemForIndex (const QModelIndex &index);
|
ElementCollectionItem *elementCollectionItemForIndex (const QModelIndex &index);
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void reload();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ElementsCollectionModel *m_model;
|
ElementsCollectionModel *m_model;
|
||||||
QLineEdit *m_search_field;
|
QLineEdit *m_search_field;
|
||||||
|
|||||||
Reference in New Issue
Block a user