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. GtkDialog mapped without a transient parent
QtWS25 Last Chance

GtkDialog mapped without a transient parent

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 439 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.
  • 1 Offline
    1 Offline
    123newuser
    wrote on 23 Sept 2021, 07:47 last edited by
    #1

    hi i am using CentOS Linux release 7.9.2009 (Core)
    in my Qt application when i open a file to read i get a warning
    Gtk-Message: 12:45:22.456: GtkDialog mapped without a transient parent. This is discouraged.
    i have spent hours on internet how to fix this but not got any solutions i have understood that i am getting this error because GTK window is not taking the parent which i am passing as "this" (in my case it is Mainwindow)

    (attaching my code here)
    MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
    {
    ui->setupUi(this);
    QString fileName = QFileDialog::getOpenFileName(this, "Open the file");
    QFile file(fileName);
    }

    so please suggest a way in which i can fix this warning thanks in advance

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 23 Sept 2021, 20:32 last edited by
      #2

      Hi,

      IIRC, it comes from the GTK platform theme plugin and nothing you can do about.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • 1 123newuser marked this topic as a regular topic on 13 Sept 2024, 06:59

      1/2

      23 Sept 2021, 07:47

      • Login

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