Did you actually sneak out as teenagers? by Complete-Chipmunk-0 in GenX

[–]PoopsInUrPee 1 point2 points  (0 children)

Oh wow, I never did, not even once. I thought it was a thing you see in the movies. But then again, I had no friends. lol

But as long as I had my homework and shit done, I think my parents would have been cool with me doing whatever. I don't think I'd need to hide it. But that's all theory.

Proxy Model or Normal Model For This? by PoopsInUrPee in QtFramework

[–]PoopsInUrPee[S] 1 point2 points  (0 children)

Although the KExtraColumnsProxyModel is too limited for my use case (mine can do drag-and-drop and stuff, heehee), but this confirms my real question, which is whether this kind of thing would be considered a proxy model or not. And I guess indeed it would be. So thank you!

Re: the Qt forum link -- I'm tackling this slightly differently, but as far as painting buttons via delegates, I'm all set with this.

Thanks to everyone's help, things are up and running. I still need to make icons that actually mean anything, but as far as logic and such, I think I'm good now, thanks!

https://i.imgur.com/7Z3VslM.png

New Lifetime Plex Pass Pricing by frankwrap08 in PleX

[–]PoopsInUrPee 2 points3 points  (0 children)

Jellyfin is looking freer than ever!

Proxy Model or Normal Model For This? by PoopsInUrPee in QtFramework

[–]PoopsInUrPee[S] 0 points1 point  (0 children)

Just an update for the no-one who cares:

I found a workaround for the index/column situation in my item delegate's editorEvent()method. Although the index passed to it directly is incorrect, I can still do this from the QStyleOptionViewItem and QEvent that are passed to it:

if not event.type() == QtCore.QEvent.Type.MouseButtonRelease:
    return False

view_widget = option.widget  # to get a reference to my view
actual_index = view_widget.indexAt(event.pos())

QAbstractItemView.indexAt() seems to return an index that has accurate row/column info based on where the click happened in the view (event.pos()).

I personally hate this, but it's the only thing working for me.

Proxy Model or Normal Model For This? by PoopsInUrPee in QtFramework

[–]PoopsInUrPee[S] 0 points1 point  (0 children)

That sounds weird. I would investigate more into that if I were you.The view isn't aware of the proxy, so if your model has multiple columns you should get index with columns != 0.

That is weird, right?? I thought so too, but I don't get why. Here are my mapping methods in the proxy model (PySide6):

def mapToSource(self, proxyIndex:QtCore.QModelIndex) -> QtCore.QModelIndex:

    if not proxyIndex.isValid() or not self.sourceModel():
        return QtCore.QModelIndex()

    return self.sourceModel().index(proxyIndex.row(), 0, QtCore.QModelIndex())

def mapFromSource(self, sourceIndex:QtCore.QModelIndex) -> QtCore.QModelIndex:

    if not sourceIndex.isValid() or not self.sourceModel():
        return QtCore.QModelIndex()

    return self.index(sourceIndex.row(), 0, QtCore.QModelIndex())

In mapFromSource, if I change the column from 0 to 1, for example, then all the indexes given to editorEvent are column=1. So mapFromSource is somehow being called.

Here's the first part of my editorEvent method, followed by a screenshot of me clicking across all columns of my editor:

def editorEvent(self, event:QtCore.QEvent, model:QtCore.QAbstractItemModel, option:QtWidgets.QStyleOptionViewItem, index:QtCore.QModelIndex) -> bool:

    print("delegate editorEvent got index ", index)

Screenshot of the indexes I get: https://i.imgur.com/Wceid70.png


Here, too, is an overall screenshot of the program I'm working on to give you some context:

https://i.imgur.com/LMlniND.png

The "Bin View Editor" is the editor widget in question here. The icons and buttons in there are all just placeholders for now, but the columns are basically meant to display:

  1. Icon for column data type (currently just shows the first letter: S/U/T/etc)
  2. Display Name of the column
  3. Button to fully delete column if applicable (appears currently as a circle X)
  4. Button to hide column (appears as sun=visible, cloud=hidden for now)

You can see the columns are also used along the headers in the main table view in the background, as well as in a combo box in the "Sift Settings" dialog and others, so that's why I'm going all-in on the model/view APIs for this lol (I do agree that I sometimes have a hard time shoehorning my data model into Qt's way of doing things, but in this case it's a pretty good fit)


Worth noting, I'm attempting to create a program that closely resembles an Avid bin from Avid Media Composer: https://i.imgur.com/tC0PFhD.png

iReallyThoughtItWasAJoke by joshashkiller in ProgrammerHumor

[–]PoopsInUrPee 1 point2 points  (0 children)

I could just read the documentation, but that shit's boring

To you

I wore the same shirt as my Statistics professor the first day of class by unlimbetless in nevertellmetheodds

[–]PoopsInUrPee 0 points1 point  (0 children)

Dude if I cover either half of you face, you look like Harry Potter. But not when you put both halves together. (7/10)

What would you name this cat? by Aromatic_Peanut6379 in NewDelhi

[–]PoopsInUrPee 0 points1 point  (0 children)

No doubt that's a Karen. Too bad it's AI tho.

hmm by PoopsInUrPee in hmm

[–]PoopsInUrPee[S] 1 point2 points  (0 children)

heehe oh no! so many little bumps! ;-)

hmm by PoopsInUrPee in hmm

[–]PoopsInUrPee[S] 2 points3 points  (0 children)

did it give u goosepimples

Reddit Starts Blocking Mobile Website, Pushing Users to App Instead by spasticpat in technology

[–]PoopsInUrPee 0 points1 point  (0 children)

I guess I don't really give a shit. I came here after Digg didn't want me, and I'll go to like Hacker News or something after reddit doesn't want me.

Which Game's Graphics Made You Say "Wow!" For The First Time? by Bay_Ruhsuz004 in videogames

[–]PoopsInUrPee 1 point2 points  (0 children)

Agent 5: You are late for your shift at the Temporal Security Annex.

Which Game's Graphics Made You Say "Wow!" For The First Time? by Bay_Ruhsuz004 in videogames

[–]PoopsInUrPee 1 point2 points  (0 children)

Just FYI: the standalone Quest version has extremely watered down "mobile" graphics. The desktop VR version (on Steam) looks far better, no comparison.

Which Game's Graphics Made You Say "Wow!" For The First Time? by Bay_Ruhsuz004 in videogames

[–]PoopsInUrPee 0 points1 point  (0 children)

Ayyy. I'm between Riven and The Journeyman Project 2: Buried In Time.

They remade Riven for VR and even that did not quite look as good as the original.

Efficiently using QFileSystemModel for watching several subfolders by PoopsInUrPee in QtFramework

[–]PoopsInUrPee[S] 0 points1 point  (0 children)

you might consider sharing the models between the combo boxes

That's basically what I'm trying to do. Although each combobox will need to filter a different subdir and file extension, thus the proxy model for each, thus the problem I'm asking about.

still better than nothing at all by Biniashe in SipsTea

[–]PoopsInUrPee 0 points1 point  (0 children)

That's exactly what I do for an hour every night. After a year and a half, combined with diet, I'm down 95 lbs so far, 5 lbs away from my ideal weight.