Results 1 to 11 of 11

Thread: Qt4.5 windows TextFind tutorial not working

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Qt4.5 windows TextFind tutorial not working

    Do you get any warnings in the console about the connect() statements? How do you know the code doesn't work?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. #2
    Join Date
    May 2009
    Posts
    9
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt4.5 windows TextFind tutorial not working

    QObject::connect(ui->pushButton,SIGNAL(clicked()),this,SLOT(huj()));
    this is compiling but nothing happens when I press the button, the button even not going down (is freeze).
    QObject::connect(ui->pushButton,SIGNAL(clicked()),ui,SLOT(huj()));

    is saying "no maching function for call..."
    in creator I cant set connection by clicking becouse he didnt see my slots

    I have good news
    QObject::connect(ui->lineEdit,SIGNAL(returnPressed()),this,SLOT(huj()) );

    this is working, but why manualy connected button with signal clicked not working? and why on_pushButton_clicked() is not connecting automatycaly even if I use //QMetaObject::connectSlotsByName(this);

    that metod is the last method in setupUi so i dont must to type it. what is wrong here?
    Last edited by czlowiekcien; 25th May 2009 at 09:07.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Qt4.5 windows TextFind tutorial not working

    Can we see the whole message you are getting?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #4
    Join Date
    May 2009
    Posts
    9
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt4.5 windows TextFind tutorial not working

    when i using
    QObject::connect(ui->pushButton,SIGNAL(clicked()),ui,SLOT(huj()));

    widget.cpp:12: error: no matching function for call to `Widget::connect(QPushButton*&, const char*, Ui::Widget*&, const char*)'

    M:/Qt/projekty/textfajnd/TextFind/../../../2009.02/qt/include/QtCore/../../src/corelib/kernel/qobject.h:202: note: candidates are: static bool QObject::connect(const QObject*, const char*, const QObject*, const char*, Qt::ConnectionType)

    M:/Qt/projekty/textfajnd/TextFind/../../../2009.02/qt/include/QtCore/../../src/corelib/kernel/qobject.h:308: note: bool QObject::connect(const QObject*, const char*, const char*, Qt::ConnectionType) const


    that is working well
    QObject::connect(ui->lineEdit,SIGNAL(returnPressed()),this,SLOT(huj()) );

  5. #5
    Join Date
    May 2009
    Posts
    9
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt4.5 windows TextFind tutorial not working

    now I`m confused 7 hour of searching what is wrong for nothing. I create another button and it was working fine so I check properties and was everething the same so I delete first button and create it again and it is working. so admin can close that subject. thanks for helping

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Qt4.5 windows TextFind tutorial not working

    Hmm... you said it was working well - I thought you found the problem. If not then I can tell you what was wrong - "ui" is not a widget thus passing "ui" as the third parameter to connect() is illegal.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    May 2009
    Posts
    9
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt4.5 windows TextFind tutorial not working

    I type ui there becouse I trying to find any way to solve my problem I know that was wrong but I still dont know why I had that problem. maybe Qt Creator is not the best tool

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Qt4.5 windows TextFind tutorial not working

    Qt Creator is just a text editor, it doesn't make syntax errors - you do
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Getting Phonon working on windows XP
    By keshava in forum Installation and Deployment
    Replies: 0
    Last Post: 12th May 2009, 16:37
  2. Windows fonts not working in QT?
    By frenetic in forum Installation and Deployment
    Replies: 2
    Last Post: 10th January 2009, 02:17

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.