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] parentwidget problem
Forum Updated to NodeBB v4.3 + New Features

[solved] parentwidget problem

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.0k Views 1 Watching
  • 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.
  • B Offline
    B Offline
    broadpeak
    wrote on last edited by
    #1

    I have an QDockWidget and I have an QTableView in my dockwidget.
    In title of QDockWidget there is a QLineEdit. I'd like to reach this lineedit from my tableview:

    @
    QObject::connect(
    ((CameraDockWidget*)parentWidget())->getLineEdit(),
    SIGNAL(textChanged(QString)),
    filter,
    SLOT(setFilterFixedString(QString))
    );
    @

    But I have no parent :(
    How can I reach the parent (or rather my lineedit)?

    1 Reply Last reply
    0
    • B Offline
      B Offline
      butterface
      wrote on last edited by
      #2

      Why can't you introduce them to each other in the class where you add both?

      1 Reply Last reply
      0
      • B Offline
        B Offline
        broadpeak
        wrote on last edited by
        #3

        Sorry, my fault was :)
        I put into the child wrong class type...

        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