KM
Katty MisikSept. 21, 2020, 6:03 a.m.
Siganal slot в ui
добрый день,
хочу сделать сигнал слот между ui каунтером:
выше (начало UI) ui->setupUi(this); timer = new QTimer(this); connect(timer, &QTimer::timeout, this, &ErrorStatus::checkForErrors); timer->start(settings.ErrorHandlerTimeOut.get()*1000); Global::errorHandler = this; agregator = new ErrorAgregator(this); ui->scrollArea->setWidgetResizable(true); ui->scrollWidget->setStyleSheet("QWidget#scrollWidget {background-color: #282828; border-left: 2px solid rgb(85,150,255);}");//40,40,40 ui->scrollArea->setStyleSheet("QScrollArea { background-color: #282828; border: 0;}");//40,40,40 Хочу сюда добавить сигнал вроде: //ui->scrollArea->setWidget(newtext); после калькулятора ошибое условие если ошибок нет через Елс if(errCount>0) getIcon()->setText("Ошибка : "+QString::number(errCount)); //изменить количество ошибок else getIcon()->setText("Нет ошибок"); //если ошибок то написать текст() QLabel *newtext = new QLabel("Нет ошибок");
We recommend hosting TIMEWEB
Stable hosting, on which the social network EVILEG is located. For projects on Django we recommend VDS hosting.Do you like it? Share on social networks!
- Дмитрий
- May 7, 2024, 9:40 a.m.
C ++ - Test 004. Pointers, Arrays and Loops
- Result:60points,
- Rating points-1
d
- dsfs
- April 26, 2024, 4:56 a.m.
C ++ - Test 004. Pointers, Arrays and Loops
- Result:80points,
- Rating points4
Last comments
Qt Linux - Lesson 001. Autorun Qt application under Linux как сделать автозапуск для флэтпака, который не даёт создавать файлы в ~/.config - вот это вопрос ))
АК
Qt WinAPI - Lesson 007. Working with ICMP Ping in Qt Без строки #include <QRegularExpressionValidator> в заголовочном файле не работает валидатор.
Анатолий КононенкоFeb. 5, 2024, 1:50 a.m.
EVADec. 25, 2023, 10:30 a.m.
Boost - static linking in CMake project under Windows Сделал всё по-как у вас, но выдаёт ошибку [build] LINK : fatal error LNK1104: не удается открыть файл "libboost_locale-vc142-mt-gd-x64-1_74.lib" Хоть убей, не могу понять в чём дел…
Qt/C++ - Lesson 056. Connecting the Boost library in Qt for MinGW and MSVC compilers Для решения твой проблемы добавь в файл .pro строчку "LIBS += -lws2_32" она решит проблему , лично мне помогло.
Now discuss on the forum
добавить qlineseries в функции в функции: "GPlotter::addSeries(QString title, QVector &arr)" я вызываю метод setChart(...), я в конструктор передал адрес на QChartView элемент
BlinCTMay 5, 2024, 5:46 a.m.
Best Indian Food Restaurant In Cincinnati OH Ready to embark on a gastronomic journey like no other? Join us at App india restaurant and discover why we're renowned as the Best Indian Food Restaurant In Cincinnati OH . Whether y…
Evgenii LegotckoiMay 2, 2024, 2:07 p.m.
IscanderCheApril 30, 2024, 4:22 a.m.
Добрый день,
Не совсем понял, какой код должен находиться в слоте, но можно подключиться через лямбда функцию.
Но лучше создавать просто текст с QString, чем с QLabel. Лучше добавить QLabel сразу, а потом менять у него текст.
Иначе у вас могут быть утечки памяти.