×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Oct 2008
    Posts
    323

    Question How to put Scroll Bar in QFrame

    Dear all,

    i want to put one scroll bar in the QFrame
    i tried on this way but its not working

    scroll = new QScrollArea();
    //scroll->setWidget(frame);
    roll->setWidget(Widgets);
    scroll->setAlignment(Qt::AlignLeft);
    scroll->setWidgetResizable(true);

    any one have idea on this ..
    how to implement scroll bar in QFrame

  2. #2
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: How to put Scroll Bar in QFrame

    Code:
    #include <QApplication>
    #include <QVBoxLayout>
    #include <QFrame>
    #include <QScrollArea>
    #include <QLabel>
    #include <QDebug>
    
    int
    main(int argc, char *argv[])
    {
        QApplication app(argc, argv);
    
        QLabel *label = new QLabel("Huge Label");
        label->setFont(QFont("Nokia Sans", 35, QFont::Bold));
    
        QScrollArea *scroll = new QScrollArea;
        scroll->setWidget(label);
    
        QVBoxLayout *layout = new QVBoxLayout;
        layout->addWidget(scroll);
    
        QFrame frame;
        frame.setLayout(layout);
        frame.resize(100, 100);
        frame.show();
    
        return app.exec();
    }

Similar Threads

  1. scroll bar not working
    By rajata in forum Symbian User Interface
    Replies: 11
    Last Post: 2009-10-03, 11:51
  2. Scroll bar problem
    By RockyM in forum Symbian User Interface
    Replies: 1
    Last Post: 2009-09-24, 10:32
  3. Scroll bar problem Nokia 5800
    By aamitgupta in forum Symbian User Interface
    Replies: 3
    Last Post: 2009-05-21, 14:09
  4. How to draw scroll bar with skin in 3rd edition
    By ppiggy in forum Symbian User Interface
    Replies: 7
    Last Post: 2007-11-07, 14:12
  5. Replies: 1
    Last Post: 2006-11-10, 05:31

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×