Results 1 to 3 of 3

Thread: Aceess Common Frame for two Different Ui class

  1. #1
    Join Date
    Jul 2019
    Posts
    4
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Aceess Common Frame for two Different Ui class

    I have used 2 common frame in 5 base class i do not want to add 2 frame again and again is it possible to share 2 common frame in all class. my frame consist 4 pushbutton. i want to get click event on this 4 button also.what is away to do this way.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Aceess Common Frame for two Different Ui class

    If what you mean by "Frame" is a QWidget with a set of child widgets inside it, then create a new class derived from QWidget and use Qt Designer to add your buttons and other widgets to it. If you want to expose the buttons clicks to the outside, then add four signals to this class and connect each one to one of the four buttons' clicked() signals. This will relay those signals to the outside world.

    Any place you want this same "Frame", you can add an instance of your custom widget and connect up the signals as needed.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. #3
    Join Date
    Jul 2019
    Posts
    4
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Aceess Common Frame for two Different Ui class

    Thanks for your suggestion. I will try and let you know soon.

Similar Threads

  1. Replies: 10
    Last Post: 16th December 2018, 08:23
  2. Replies: 1
    Last Post: 5th December 2013, 07:46
  3. how can i aceess ui dialog in a thread
    By gauravg in forum Qt Programming
    Replies: 1
    Last Post: 27th March 2012, 15:16
  4. no frame on Qlabel derived class
    By tupu_83 in forum Qt Programming
    Replies: 2
    Last Post: 19th November 2008, 17:01
  5. Previous frame inner to this frame(corrupt stack?)
    By coralbird in forum Qt Programming
    Replies: 17
    Last Post: 29th April 2006, 02:42

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.