Results 1 to 2 of 2

Thread: is there any signal for QScrollArea?

  1. #1
    Join Date
    May 2006
    Location
    Bangalore,India
    Posts
    235
    Qt products
    Qt3 Qt4
    Platforms
    Windows
    Thanks
    7
    Thanked 25 Times in 24 Posts

    Default is there any signal for QScrollArea?

    Hi,

    which signal emitted by QScrollArea while user move horizontal scroll bar?

    I have written following code, but not working.

    [html]
    QHBoxLayout *mainLayout = new QHBoxLayout( this );
    m_wavePane = new SignalWidget( this );
    m_wavePane->setBackgroundRole( QPalette::Shadow );
    m_draggablePinName = new DragWidget( this );

    connect( m_draggablePinName, SIGNAL( pinLabelMoved( const QString &, const QPoint & ) ),
    m_wavePane, SLOT( widgetMoved( const QString &, const QPoint & ) ) );
    m_draggablePinName->setMinimumWidth(60);
    mainLayout->addWidget( m_draggablePinName );

    QScrollArea *m_scrollArea = new QScrollArea;
    m_scrollArea->setWidget(m_wavePane);
    m_scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff );
    mainLayout->addWidget(m_scrollArea);
    QScrollBar *scrollBar = m_scrollArea->horizontalScrollBar();
    connect(scrollBar,SIGNAL(sliderMoved(int)),this,SL OT(scrollMoved(int)));

    [/html]

  2. #2
    Join Date
    May 2006
    Location
    Bangalore,India
    Posts
    235
    Qt products
    Qt3 Qt4
    Platforms
    Windows
    Thanks
    7
    Thanked 25 Times in 24 Posts

    Default Re: is there any signal for QScrollArea?

    it working after adding
    scrollBar->setSliderDown(true);

Similar Threads

  1. Replies: 2
    Last Post: 17th May 2006, 21:01
  2. QSortFilterProxyModel signal and selection confusion
    By pascal123 in forum Qt Programming
    Replies: 1
    Last Post: 1st April 2006, 16:25
  3. no such signal QListBox::currentChanged()
    By jopie bakker in forum Newbie
    Replies: 2
    Last Post: 2nd March 2006, 15:17
  4. send signal from QCombobox
    By raphaelf in forum Qt Programming
    Replies: 22
    Last Post: 28th February 2006, 14:18
  5. signal slot conection using a string, not a SLOT
    By rianquinn in forum Qt Programming
    Replies: 6
    Last Post: 5th February 2006, 18:52

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.