Results 1 to 5 of 5

Thread: I have a rather convoluted question

  1. #1
    Join Date
    Apr 2017
    Posts
    55
    Thanks
    8
    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,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 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
    55
    Thanks
    8
    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
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    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
    55
    Thanks
    8
    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 21:39.

Similar Threads

  1. question about xmpp (different question)
    By davinciomar in forum Newbie
    Replies: 9
    Last Post: 6th September 2016, 14:52
  2. more of a C++ question
    By jajdoo in forum Newbie
    Replies: 6
    Last Post: 17th August 2010, 21:40
  3. Question
    By Dumbledore in forum Qt Programming
    Replies: 1
    Last Post: 21st October 2007, 00:12
  4. convoluted GUI
    By Walsi in forum Newbie
    Replies: 8
    Last Post: 26th April 2007, 11: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.