Results 1 to 3 of 3

Thread: code for promote to

  1. #1
    Join Date
    Jul 2009
    Posts
    12
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default code for promote to

    I was wondering if you can do the same thing as right click on an a QFrame let's say and choose promote to fpanel let's say (obviously also a QFrame type), but via code.
    i am trying to change the contents of a QFrame after a button was clicked.
    Any help will be greatly appreciated. Thank you

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: code for promote to

    Quote Originally Posted by andreime View Post
    I was wondering if you can do the same thing as right click on an a QFrame let's say and choose promote to fpanel let's say (obviously also a QFrame type), but via code.
    i am trying to change the contents of a QFrame after a button was clicked
    You can't. But you could use a QStackedWidget with a QFrame on page 1 and a fpanel on page 2.

    Or maybe there is a better solution if you describe more, what exactly you want to change.

  3. #3
    Join Date
    Jul 2009
    Posts
    12
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: code for promote to

    So i want to do something like this:
    i have a fPanel frame widget that has inside a tableWidget and some buttons + labels
    and a tPanel frame widget that has inside a treeWidget and the same buttons and labels

    in the mainwindow i have leftFrame and rightFrame that i promoted to fPanel.
    i want to be able to change the type of anyone of the two frames to either fPanel or tPanel.

    i tried several things. i even got to the point where i thought that because they are all QFrame types i can equalize them something like
    Qt Code:
    1. m_ui->leftFrame = new tPanel
    To copy to clipboard, switch view to plain text mode 
    obviously it didn't work.
    i want to display the contents of my drives, similar to total commander or norton commander, and to change the view type from list to tree by the push of a button.
    i don't know how to do that . i tried but failed. i also think that there is way but it somehow eludes me. any ideas?

Similar Threads

  1. How to put custom handle image in QSlider using code?
    By montylee in forum Qt Programming
    Replies: 6
    Last Post: 29th January 2009, 19:38
  2. copyright and gpl
    By janus in forum General Discussion
    Replies: 8
    Last Post: 21st October 2008, 01:13
  3. Pasting code from code tag in emacs
    By Gopala Krishna in forum General Discussion
    Replies: 0
    Last Post: 16th February 2007, 05:47
  4. Qt Cryptographic Architecture
    By vermarajeev in forum Qt Programming
    Replies: 6
    Last Post: 9th February 2007, 13:15

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.