Results 1 to 6 of 6

Thread: am New to qt, Help ME please...

  1. #1
    Join Date
    Jul 2011
    Location
    India
    Posts
    7
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: am New to qt, Help ME please...

    stack . cpp
    Qt Code:
    1. #include "stack.h"
    2. #include <QHBoxLayout>
    3. #include <QVBoxLayout>
    4. int i=0;
    5. StackTest::StackTest(QWidget *parent):QWidget(parent)
    6. {
    7. QHBoxLayout *HLayout = new QHBoxLayout;
    8. QVBoxLayout *VLayout = new QVBoxLayout;
    9. newStack = new QPushButton;
    10. prevStack = new QPushButton;
    11. nextStack = new QPushButton;
    12. addresText = new QLineEdit;
    13. stackWidget = new QStackedWidget;
    14. HLayout->addWidget(addresText);
    15. HLayout->addWidget(prevStack);
    16. HLayout->addWidget(nextStack;
    17. HLayout->addWidget(newStack);
    18. VLayout->addLayout(HLayout);
    19. VLayout->addWidget(stackWidget);
    20. setLayout(VLayout);
    21. connect(newStack,SIGNAL(clicked()),this,SLOT(on_ne wStack_cliked()));
    22. }
    23. void StackTest:: on_newStack_cliked()
    24. {
    25. view[i]=new QWebView;
    26. stackWidget->addWidget(view[i]);
    27. view[i]->load(QUrl("http://google.com"));
    28. i += 1;
    29. }
    To copy to clipboard, switch view to plain text mode 

    here i attached the file
    Stack.zip

    showing err:
    error: expected ')' before ';' token



    Added after 7 minutes:


    Help Me Please
    Last edited by high_flyer; 21st July 2011 at 10:53. Reason: code tags

  2. #2
    Join Date
    May 2011
    Posts
    239
    Qt products
    Qt4
    Platforms
    Unix/X11 Symbian S60
    Thanks
    4
    Thanked 35 Times in 35 Posts

    Default Re: am New to qt, Help ME please...

    Help yourself get help!
    * Many people don't even open messages that do not have a descriptive title. Asking for help is not such -- most new threads request help. A more detailed title would be: "Compiling error: expected ')' before ';' token"
    * I'm sure the compiler told you more than "error: expected ')' before ';' token". All compiler tell the row where the error is.
    * When the compiler suggests that a ')' is missing, I'm sure you tried adding one (of course you did), but you don't tell what happened.
    * You should start the message with a clear description of the problem. Now a reader just sees a code listing and many will go back immediately.

  3. #3
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android
    Thanked 342 Times in 324 Posts

    Default Re: am New to qt, Help ME please...

    I agree with mvuori, I'm sure compiler told you what line is causing the error, so it should be enough to solve it yourself. If you could not fix it, at least post which line caused the error.

  4. #4
    Join Date
    Jun 2007
    Location
    India
    Posts
    33
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8

    Default Re: am New to qt, Help ME please...

    Qt Code:
    1. HLayout->addWidget(nextStack);
    To copy to clipboard, switch view to plain text mode 
    solves it for the time being.
    Agree with mvuori and stampede. Hope you will get used to the ways of seeking help in here.
    Design is easy. All you do is stare at the screen until drops of blood form on your forehead.
    -Marty Neumeier

  5. #5
    Join Date
    Jul 2011
    Location
    India
    Posts
    7
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: am New to qt, Help ME please...

    sorry for waisting your time...
    extremely sorry...

    and thank you all too.

  6. #6
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Wiki edits
    17

    Default Re: am New to qt, Help ME please...

    You weren't wasting our time, just yours. Creating that post and attachment would have taken you far longer than reading the error message, looking at the line involved, and the lines preceding it, and adding the missing ')' that the error explicitly tells you is missing.

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.