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. Select a tab of a QTabWidget with mouseClick()
QtWS25 Last Chance

Select a tab of a QTabWidget with mouseClick()

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 849 Views
  • 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.
  • L Offline
    L Offline
    LongJohn
    wrote on last edited by
    #1

    Hi,

    can someone explain me why I can one time select a tap of the QTabWidget with QTest::mouseClick() and then it's not possible to select an other tab?

    @
    const int positionXSecond = 180;
    const int positionYSecond= 45;
    QTest::qWait(2000);

    // Select the second Tab of the MainWindow
    QPoint posSecond = QPoint( positionXSecond , positionYSecond);
    QTest::mouseMove ( mw, posSecond , -1 );
    QTest::mouseClick( mw->childAt( posSecond ), Qt::LeftButton, Qt::NoModifier, QPoint(), 100 );

    // does nothing
    const int positionXOne = 60;
    const int positionYOne = 45;
    QPoint posOne= QPoint( positionXOne , positionYOne );
    QTest::mouseMove ( mw, posOne, -1 );
    QTest::mouseClick( mw->childAt( posOne), Qt::LeftButton, Qt::NoModifier, QPoint(), 100 );
    @

    1 Reply Last reply
    0
    • S Offline
      S Offline
      StephenQin
      wrote on last edited by
      #2

      Have you solved this Question?

      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