Results 1 to 5 of 5

Thread: I have a rather convoluted question

  1. #1
    Join Date
    Apr 2017
    Posts
    43
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default I have a rather convoluted question

    I am using RHEL 6 and Qt4.8
    Also using QtCreator.

    I have a project where I have a QListWidget implemented on a ui form. All my functionality works as I expect it.
    I have another project where I have a regular ui implemented. I added another UI to that project via Add New Class.

    1) First I want to show the new ui via a button press on the existing GUI. I cannot get the added ui to be recognized by the existing UI.

    2) Then I want to put my QListWidget from the other project onto this added UI.

    If I get #1 solved, I think I can get #2 done myself.

    Thanks for any help

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,370
    Thanks
    36
    Thanked 1,538 Times in 1,489 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: I have a rather convoluted question

    What does "another UI" mean?

    A window of some kind (dialog, mainwindow)?
    Or a widget that needs to be embedded into a container somewhere?

    What do you mean with "cannot get it recognized"?
    Are there any errors?

    Cheers,
    _

  3. #3
    Join Date
    Apr 2017
    Posts
    43
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: I have a rather convoluted question

    Quote Originally Posted by anda_skoa View Post
    What does "another UI" mean?

    A window of some kind (dialog, mainwindow)?
    Or a widget that needs to be embedded into a container somewhere?

    What do you mean with "cannot get it recognized"?
    Are there any errors?

    Cheers,
    _
    The original project is a QMainWindow type of project. everything is part of the .pro file and compiles.
    The compiler error is
    invalid use of lp1->ui->listPanel1->show();

    I try to get the MainWindow code to recognize the listPanel1 panel with this line of code in the .h file for the MainWindow cpp file.
    listPanel1* lp1;

    listPanel1 is the name of the second ui panel class and its .h file is included in the .h file for the MainWindow class.

    Thanks

  4. #4
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    4,024
    Thanks
    233
    Thanked 642 Times in 632 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: I have a rather convoluted question

    The compiler error is
    invalid use of lp1->ui->listPanel1->show();
    "listpanel1" is the name of a class. The compiler is telling you you can't use the name of a class in the context of the statement you have written.
    <=== 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.

  5. #5
    Join Date
    Apr 2017
    Posts
    43
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: I have a rather convoluted question

    Quote Originally Posted by d_stranz View Post
    "listpanel1" is the name of a class. The compiler is telling you you can't use the name of a class in the context of the statement you have written.
    This brings me back to my original question. How do I get my code to recognize this additional ui so that I can display it? Is my declaration in the header file wrong as I have it written above?


    Added after 1 27 minutes:


    Quote Originally Posted by emp1953 View Post
    This brings me back to my original question. How do I get my code to recognize this additional ui so that I can display it? Is my declaration in the header file wrong as I have it written above?
    It looks like I solve the issue. It was with my header file declaration.
    Thanks to all
    Last edited by emp1953; 30th April 2019 at 20:39.

Similar Threads

  1. question about xmpp (different question)
    By davinciomar in forum Newbie
    Replies: 9
    Last Post: 6th September 2016, 13:52
  2. more of a C++ question
    By jajdoo in forum Newbie
    Replies: 6
    Last Post: 17th August 2010, 20:40
  3. Question
    By Dumbledore in forum Qt Programming
    Replies: 1
    Last Post: 20th October 2007, 23:12
  4. convoluted GUI
    By Walsi in forum Newbie
    Replies: 8
    Last Post: 26th April 2007, 10:15

Tags for this Thread

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.