Results 1 to 3 of 3

Thread: widget for text AND buttons

  1. #1
    Join Date
    Mar 2006
    Posts
    10
    Thanks
    1
    Thanked 2 Times in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default widget for text AND buttons

    Hello

    I have a rather simple question (again).
    I wuld like to have, or make a widget, that is suitable for two purposes, first to show some long text, and second to have somewhere inside the text some buttons. It would be a simple tutorial for a card-game, the text explains the rules of the game, and by pushing the buttons, the user opens a modal dialog, where he/she can test what hs/she learnt so far.
    I tried QTextEdit, but I could not position the buttons indide the text.
    Thanks for Your answers

    Peter

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

    Default Re: widget for text AND buttons

    QTextBrowser would be a little better here. Create buttons as links and use some kind of styling mechanism (depending on which Qt version you use) to make them look more button-ish. For Qt3 it would be QStyleSheet.

  3. #3
    Join Date
    Mar 2006
    Posts
    10
    Thanks
    1
    Thanked 2 Times in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: widget for text AND buttons

    Thanks, it was a good idea (I did not try QTextBrowser since I did not realise that the setSource() function is virtual). It was really easy this way.
    Peter

Similar Threads

  1. How to get larger radio buttons on XP?
    By Ben.Hines in forum Qt Programming
    Replies: 9
    Last Post: 24th April 2006, 19:00
  2. Widget Library/Repository
    By strandtc in forum Qt Programming
    Replies: 5
    Last Post: 1st March 2006, 18:37
  3. Widget resizing problem
    By fwohlfert in forum Qt Programming
    Replies: 3
    Last Post: 23rd February 2006, 08:16
  4. Replies: 12
    Last Post: 15th February 2006, 10:46
  5. QRubberBand painting in the scroll area widget
    By SkripT in forum Qt Programming
    Replies: 7
    Last Post: 17th January 2006, 16:48

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.