Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Adding widgets using successor
Forum Updated to NodeBB v4.3 + New Features

Adding widgets using successor

Scheduled Pinned Locked Moved General and Desktop
1 Posts 0 Posters 478 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? This user is from outside of this forum
    ? This user is from outside of this forum
    Guest
    wrote on last edited by
    #1

    I am trying to add widgets using class, which is successor of another class. Code:
    @class1:class1(QMainWindow *parent):QMainWindow(parent){
    QWidget *window = new QWidget();
    //Adding widgets
    }@
    @class2:class2(class1 *parent):class1(parent) {
    //Adding other widgets to the same QWidget
    }@
    @int main(int argc, char *argv[])
    {
    QApplication a(argc, argv);
    class1 w;
    if(w.getCmbName()=="foo") //reading current value of combobox. It was created in class1
    class2 l;
    w.show();
    return a.exec();
    }@
    I have no errors but widgets from class2 are not appear. What am I doing wrong?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved