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. What is a better way to step through my application?
Forum Updated to NodeBB v4.3 + New Features

What is a better way to step through my application?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 993 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.
  • D Offline
    D Offline
    Deepfreeze
    wrote on last edited by
    #1

    I am new to Qt and GUI programming, but was able to realize my first application.
    What it does is showing the user some images and text and gives a button to
    start the rest of the program. Then the program steps through different widgets
    where the user is shown different images. The program steps to the next widget
    after a certain function has been performed.

    So what I currently do is:
    @
    MyClass1 *myObject1 = new MyClass1(); // Where MyClass inherited from QWidget

    // do some function that takes long

    MyClass2 *myObject2 = new MyClass2(); // Where MyClass inherited from QWidget

    // do some function that takes long

    MyClass3 *myObject3 = new MyClass3(); // Where MyClass inherited from QWidget

    // do some function that takes long
    @

    Now this works, but not as I desire and probably it can be done better.
    In example for each widget a new window is opened, I tried to solve this by
    @ MyClass3(this) @

    but the result was that the images weren't shown correctly.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      One widget, showing one QLabel. Call QLabel::setPixmap() to change the image.

      1 Reply Last reply
      0
      • D Offline
        D Offline
        Deepfreeze
        wrote on last edited by
        #3

        Thanks, works like a charm.

        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