Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. Tags
    3. qt 5.12
    Log in to post

    • UNSOLVED Creating custom model for QTableView
      General and Desktop • qtableview qt 5.12 • • Thank You  

      5
      0
      Votes
      5
      Posts
      43
      Views

      @Thank-You said in Creating custom model for QTableView: I want to add one row at the end of the table as show in the above picture Help me guys Already told you what you need to do. What help are you expecting? We don't write the code for you (we also have a lot of work to do!), we tell you what you need to do.
    • UNSOLVED Warning: QObject::startTimer: Timers can only be used with threads started with QThread
      General and Desktop • qthread qtimer shared library static library qt 5.12 • • adw0022  

      2
      0
      Votes
      2
      Posts
      127
      Views

      Install a Qt message handler, set a breakpoint in there and take a look at the backtrace where it comes from.
    • UNSOLVED QSerialPort::UnsupportedOperationError ("Invalid argument") error in opening /dev/diag port in Android device using QSerialPort in Qt Android
      General and Desktop • c++ android qt 5.12 arm64-v8a • • morteza ali ahmadi  

      6
      0
      Votes
      6
      Posts
      220
      Views

      I can open this port by: So, as I said, the problem is not in O_LARGEFILE. There are just a few codes in QSP sources in github link This is not a sources, the sources is in.
    • SOLVED Setting Focus in floating QDockWidget
      General and Desktop • c++ qdockwidget focus qt 5.12 floating • • Tom 2020  

      4
      0
      Votes
      4
      Posts
      190
      Views

      Sorry for the late reply, I actually managed to figure out how to get my intended behaviour, after calling <setFloating(true)> i needed to add <setWindowFlags(Qt::Window | Qt::FramelessWindowHint);> to make it able to take focus.
    • UNSOLVED QSqlquery exec timeout
      General and Desktop • qsqldatabase qsqlquery qt 5.12 exec timeout • • BartoszPaj  

      5
      0
      Votes
      5
      Posts
      272
      Views

      Process still block, when I lost connection.
    • SOLVED DelegateChooser creates delegates in other context
      QML and Qt Quick • tableview qt 5.12 delegatechooser • • SebastianM  

      7
      0
      Votes
      7
      Posts
      193
      Views

      @SebastianM great that you managed to figure it out. It's a bit difficult to read all this on a mobile screen so excuse my previous posts 🙈 Never the less, thanks for charing the answer
    • SOLVED Different delegates in TableViewColumn depending on data
      QML and Qt Quick • tableview delegate qt 5.12 • • SebastianM  

      5
      0
      Votes
      5
      Posts
      238
      Views

      Cool, that's what I was looking for.
    • UNSOLVED About QSerialPort
      General and Desktop • qserialport qt 5.12 • • ALONELUR  

      3
      0
      Votes
      3
      Posts
      82
      Views

      Hi and welcome to devnet, This is a known issue: QTBUG-78086. It's fixed and will be part of Qt 5.12.6 and 5.13.2.
    • SOLVED QPushButton not clickable even if activated
      General and Desktop • visual studio qpushbutton qt 5.12 vs 2019 qt 5.12.4 • • Lanfeust  

      7
      0
      Votes
      7
      Posts
      881
      Views

      Thank you everbody, thanks to you I have found a way to correct my program. I did as you told me to do: I removed everything the Constructor object knew about its parent (puting it in the parent instead) and the problem went away. I still don't know from where it was coming, but we can clearly see that having a better-programmed program helps to correct some bugs. ^^ Thanks again to everybody. :D If you want my corrected code, here it is: main.cpp (nothing changed) #include "Window.h" #include <QtWidgets/QApplication> int main(int argc, char *argv[]) { QApplication a(argc, argv); Window w; w.show(); return a.exec(); } Window.h #ifndef DEF_WINDOW #define DEF_WINDOW #include "Constructor.h" #include <QWidget> #include <QVBoxLayout> #include <QPushButton> #include <vector> class Window : public QWidget { Q_OBJECT public: Window(); public slots: void addConstructor(); void destroyConstructor(Constructor*); private: QVBoxLayout* mainLayout = new QVBoxLayout; QVBoxLayout* constructorLayout = new QVBoxLayout; std::vector<Constructor*>* constructorVector = new std::vector<Constructor*>; QPushButton* addConstructorButton = new QPushButton("+", this); }; #endif Window.cpp #include "Window.h" Window::Window() { connect(addConstructorButton, SIGNAL(clicked()), this, SLOT(addConstructor())); mainLayout->addLayout(constructorLayout); mainLayout->addWidget(addConstructorButton); setLayout(mainLayout); } void Window::addConstructor() { Constructor* c = new Constructor(this); constructorLayout->addWidget(c); constructorVector->push_back(c); connect(c, SIGNAL(mustBeDestroyed(Constructor*)), this, SLOT(destroyConstructor(Constructor*))); } void Window::destroyConstructor(Constructor* c) { constructorLayout->removeWidget(c); //remove object from vector for (int i = 0; i < constructorVector->size(); i++) if (constructorVector->at(i) == c) { constructorVector->erase(constructorVector->begin() + i); break; } } Constructor,h #ifndef DEF_CONSTRUCTOR #define DEF_CONSTRUCTOR #include <QWidget> #include <QLineEdit> #include <QHBoxLayout> #include <QPushButton> #include <QLayout> #include <vector> class Constructor : public QWidget { Q_OBJECT public: Constructor(QWidget* parentWidget); public slots: void destroySelf(); signals: void mustBeDestroyed(Constructor*); private: QLineEdit* lineEdit = new QLineEdit(this); QPushButton* destroyConstructorButton = new QPushButton("-", this); }; #endif Constructor.cpp #include "Constructor.h" Constructor::Constructor(QWidget* parentWidget) : QWidget(parentWidget) { connect(destroyConstructorButton, SIGNAL(clicked()), this, SLOT(destroySelf())); QHBoxLayout* layout = new QHBoxLayout; layout->addWidget(lineEdit); layout->addWidget(destroyConstructorButton); setLayout(layout); } void Constructor::destroySelf() { delete lineEdit; delete destroyConstructorButton; emit mustBeDestroyed(this); this->disconnect(); delete this; }
    • SOLVED QJSEngine cleanup/destructor
      General and Desktop • javascript qjsengine qt 5.12 cleanup destructor • • yah_nosh  

      14
      0
      Votes
      14
      Posts
      886
      Views

      Anyone can contribute to the documentation, the code, etc. You have to follow the procedures and rules but it's not some walled garden.
    • UNSOLVED Qt Raspberry Pi Cross Compile
      Mobile and Embedded • raspberry pi 3 cross-compile qt 5.12 source • • Kanni1303  

      5
      0
      Votes
      5
      Posts
      1465
      Views

      Hi, I described the steps I followed in a post over here, https://mechatronicsblog.com/cross-compile-and-deploy-qt-5-12-for-raspberry-pi/ Some people found some issues and posted comments there, the “qendian” issue seems to be related to this bug, there is also a patch there. https://bugreports.qt.io/browse/QTBUG-71945
    • SOLVED QQuickWindow in 5.12
      General and Desktop • mac os x qt 5.12 qquickwindow • • J.Hilk  

      22
      0
      Votes
      22
      Posts
      1824
      Views

      A quick and final update: https://bugreports.qt.io/browse/QTBUG-72641 The topic was reopened - in no small part due to @Kalileo I believe ;-) - and the error seems to be found and fixed. The fixed version seems to be the upcoming 5.12.1 and onwards. Thanks everyone for the interest and help in the issue.
    • SOLVED Qt 5.12 static build for webassembly: cannot configure mysql database
      Installation and Deployment • mysql qt 5.12 qt-wasm • • Baru  

      5
      0
      Votes
      5
      Posts
      1055
      Views

      @raven-worx Thanks a lot. Now, I got a perspective on how I can proceed further. I will try the solution with the QWebSocket and see how that goes. Cheers!
    • UNSOLVED Create Qt DLL usable from VB
      General and Desktop • dll qt 5.12 vba • • Bastien  

      6
      0
      Votes
      6
      Posts
      702
      Views

      @Bastien I build with MinGW on Qt Creator. And when I use DLL, I've the error. I didn't ask you that. I know that. That's why I asked you: And when you build it in Visual Studio you are using the MinGW compiler, not the MSVC one, just like you show you are using from Qt Creator, right? So I asked you what compiler you are using from Visual Studio, not Qt Creator. Having to make a guess and assuming you use MinGW from Qt Creator but MSVC from VS, I imagine that is precisely the answer to your: This code works fine in Visual Studio but not in QtCreator... Why ?