Results 1 to 2 of 2

Thread: Displaying Page Number on a widget

  1. #1
    Join Date
    Jul 2007
    Posts
    25
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Displaying Page Number on a widget

    Hi,

    I'm working on an application which requires page numbers to be displayed at the bottom corner of the pages. I'm actually using widget, which has QImage filled with, RGB = 255, i.e. a white space, wherein I'm scribbling using QPainter.
    Now I want to display page number of each of the pages, since I'm navigating to and fro, while scribbling on the pages. Its a linked list of scribbled pages.

    any help in this regard will be appreciated alot.

    Thanks

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Displaying Page Number on a widget

    You could create a container widget with a vertical layout.
    You should add in it your canvas widget and just below a QLabel that will display the page number. You could also add two buttons for next/prev page:
    < PageNumber >.

    Of course, you will need to make some connections: when you change the page also update the label text. You can use the QLabel::setText slot.

    Regards

Similar Threads

  1. KDE/QWT doubt on debian sarge
    By hildebrand in forum KDE Forum
    Replies: 13
    Last Post: 25th April 2007, 06:13
  2. Widget to display an HTML page ?
    By probine in forum Qt Tools
    Replies: 3
    Last Post: 11th October 2006, 18:55
  3. QWidget display on 2 stack widget page
    By spawnwj in forum Qt Programming
    Replies: 3
    Last Post: 4th September 2006, 12:07

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.