Results 1 to 6 of 6

Thread: connectSlotsByName and clicked()

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2009
    Posts
    10
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: connectSlotsByName and clicked()

    I'm having problem that is driving me nuts. I'm also using setupUi with on_objectName_signalName() connections. When I call:
    Qt Code:
    1. void on_DateButton_clicked()
    2. {
    3. this->setWindowTitle("Some title");
    4. }
    To copy to clipboard, switch view to plain text mode 
    this works fine but:
    Qt Code:
    1. void on_DateButton_clicked()
    2. {
    3. lineEdit_2->insert("Some text");
    4. }
    To copy to clipboard, switch view to plain text mode 
    app crushes.
    Any ideas?
    I appologize for my poor English.

  2. #2
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: connectSlotsByName and clicked()

    are you sure that "lineEdit_2" is class member? are you sure that "lineEdit_2" contains not null pointer? maybe you should use "ui->lineEdit_2" instead.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.