Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved] How can Icapture QDialog´s load/show event?
QtWS25 Last Chance

[Solved] How can Icapture QDialog´s load/show event?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 8.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    phamtv
    wrote on last edited by
    #1

    Can you provide me with a code snippet to do this. in my .cpp file constructor, I tried the follwing but it did not like the line ¨ if (obj == ui->frm_Connection)¨

    @
    // in constructor
    installEventFilter(this);

    bool frm_Connection::eventFilter(QObject *obj, QEvent *event)
    {
    if (obj == ui->frm_Connection)
    {
    if(event == QEvent::Show)
    {
    }
    }
    }
    @

    thanks!

    1 Reply Last reply
    0
    • P Offline
      P Offline
      Polto
      wrote on last edited by
      #2

      @if (obj == ui->frm_Connection)@
      i think it can be
      @if(obj == this)@

      Polto

      1 Reply Last reply
      0
      • P Offline
        P Offline
        phamtv
        wrote on last edited by
        #3

        I found it!!! You just need to override QDialog´s showEvent sub routine.

        1 Reply Last reply
        0
        • F Offline
          F Offline
          Franzk
          wrote on last edited by
          #4

          That is indeed the solution you need to go for.

          "Horse sense is the thing a horse has which keeps it from betting on people." -- W.C. Fields

          http://www.catb.org/~esr/faqs/smart-questions.html

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved