Results 1 to 4 of 4

Thread: Convert QWidget to QVariant How to?

  1. #1
    Join Date
    Oct 2009
    Location
    Russia, South Ural, Chelyabinsk
    Posts
    42
    Thanks
    1
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Convert QWidget to QVariant How to?

    Hi!

    Is it possible to convert QWidget (for ex. QPushButton, QLineEdit) to QVariant?

  2. #2
    Join Date
    Aug 2009
    Posts
    52
    Thanked 10 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Convert QWidget to QVariant How to?

    Quote Originally Posted by sergey_85 View Post
    Hi!

    Is it possible to convert QWidget (for ex. QPushButton, QLineEdit) to QVariant?
    impossible

  3. #3
    Join Date
    Oct 2009
    Location
    Russia, South Ural, Chelyabinsk
    Posts
    42
    Thanks
    1
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Convert QWidget to QVariant How to?

    Ok, can I convert my user type (base class QObject) to QVariant?

    class MyObject: public QObject
    {
    public slots:
    };
    //How to convert MyObject to QVariant??

  4. #4
    Join Date
    Oct 2009
    Posts
    105
    Thanked 4 Times in 2 Posts
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Convert QWidget to QVariant How to?

    Quote Originally Posted by sergey_85 View Post
    Ok, can I convert my user type (base class QObject) to QVariant?

    class MyObject: public QObject
    {
    public slots:
    };
    //How to convert MyObject to QVariant??
    It seems that this link is removed.

Similar Threads

  1. Replies: 1
    Last Post: 4th December 2009, 17:03
  2. convert QVariant to QAction
    By sepehr in forum Qt Programming
    Replies: 3
    Last Post: 5th April 2009, 11:03
  3. Convert between a custom data type wrapped in a QVariant
    By darkadept in forum Qt Programming
    Replies: 2
    Last Post: 17th March 2009, 09:07
  4. Getting Microsoft Word Object to SaveAs
    By jvwebb in forum Newbie
    Replies: 3
    Last Post: 2nd September 2008, 19:27
  5. Replies: 8
    Last Post: 16th July 2008, 14:05

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.