Navigation

    Qt Forum

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

    • why definition is talking from .cpp file?
      General and Desktop • c++ dll virtual qt 5.11.0 • • Yash001  

      7
      0
      Votes
      7
      Posts
      346
      Views

      @Yash001 said in why definition is talking from .cpp file?: why it is working if I will define the definition inside the class Because then the compiler sees the definition when you compile your executable. just now I try Q_DECL_EXPORT virtual QString GetExpParamTxt(QWidget*)const;. I got same error. You did not read the link carefully... you have to export it when compiling the lib, import it when linking against as explained.
    • UNSOLVED C++ / Qt5.1.1 - Call virtual function in another class
      C++ Gurus • virtual • • mad-hatter  

      10
      0
      Votes
      10
      Posts
      3217
      Views

      @mad-hatter You can't define a destructor of a base class in a derived class! So, adding ~Plug_Entity() {} in derived is invalid. Simply add ~derived() {}. See https://www.geeksforgeeks.org/pure-virtual-destructor-c/
    • SOLVED TableView lazy load & Virtual Mode
      QML and Qt Quick • tableview load virtual lazy mode • • Dong  

      2
      0
      Votes
      2
      Posts
      1291
      Views

      If you use a QAbstractListModel the data() will be accessed on demand only (tested). TableView will reuse delegates when scrolling up/down and not create new ones (according to description)
    • SOLVED Invokable and pure virtual method(s)
      General and Desktop • qobject virtual invokable • • kshegunov  

      13
      0
      Votes
      13
      Posts
      6419
      Views

      @ttuna Hello, Thanks, I know that. I wanted to have a method of my private object to be queued for later execution, because the ChildAdded event that I'm handling in an event filter is propagated before the child object is fully constructed. It appears that the gadgets have no such capability so I've implemented the functionality as a private slot, and it works okay. For anyone that might be interested, here's how: class AGUI_API AgDial : public QStackedWidget { Q_OBJECT // ... private: Q_PRIVATE_SLOT(d(), void scheduleChildAdd(QPointer<QObject>)) }; With the corresponding invocation in the event filter: bool AgDial::eventFilter(QObject * object, QEvent * event) { switch (event->type()) { case QEvent::ChildAdded: QMetaObject::invokeMethod(this, "scheduleChildAdd", Qt::QueuedConnection, Q_ARG(QPointer<QObject>, QPointer<QObject>(reinterpret_cast<QChildEvent *>(event)->child()))); break; // ... } } Kind regards.
    • UNSOLVED QtCreator 3.1.1 (Qt 5.2.1) virtual method causes segmentation fault
      General and Desktop • segmentation virtual fault method • • StephanWoebbeking  

      6
      0
      Votes
      6
      Posts
      1905
      Views

      @AlterX Ok, I see, I will change this for the device internal pointers, but the "currentDevice" is used many times from outside to access that data. That's why I kept it public, I didn't really see much sense it making that private and then allow to read it anyway. I see the issue of it being written from outside, but I checked all occurences and they all solely query data and call methods, so I didn't think it helps me with the segmentation fault, what do you think? Stephan
    • UNSOLVED How to hide virtual keyboard in Android?
      Mobile and Embedded • android keyboard qt 5.5.1 virtual • • HPCTECH  

      1
      0
      Votes
      1
      Posts
      555
      Views

      No one has replied

    • Virtual/Hidden File System
      General and Desktop • resource files virtual • • Scribe  

      3
      0
      Votes
      3
      Posts
      854
      Views

      Thank you Anant, I will be deploying both to Linux and Windows and so require a solution for both, however they don't necessarily have to be the same solution. Many thanks
    • Qt Installaer Framework - Selecting Components
      Tools • installer selection qtifw component qt installer fr virtual • • Yagiza  

      1
      0
      Votes
      1
      Posts
      624
      Views

      No one has replied